Project

General

Profile

Actions

Feature #16438

closed

Improvements of inlineCSS: adding classes to inline elements without additional span

Added by Uschi Renziehausen over 17 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Should have
Category:
RTE (rtehtmlarea + ckeditor)
Target version:
-
Start date:
2007-07-27
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The following behaviour comes very close to a bug. Currently it IS possible to add a class directly to a given inline element, but due to the way selection works in the browsers it is very incomfortable for all of us and next to impossible for editors with no knowledge of HTML. Say, we want to add a class 'important' to a <b>- or <strong>-element.

Example with one word bold in FF:

<p>This is a paragraph with a very important <b>word</b> inside.</p>

The normal way to mark a word is doubleclicking on it, but doing so, our selected string will contain the markup as well, that is <b>word</b>.

The inlineCSS plugin checks whether the parent element of the selection is a blockelement, which will be true in the example above, and the resulting code will be: <span class="important"><b>word</b></span>.

The only way to get it right currently is to select the string carefully with the mouse or with with arrow right letter by letter, carefully watching the bottom toolbar, whether you are still inside the <b>-element, and this is of no way for normal editors.

What I think appropriate:

1) Check, whether the text node is marked up and if the selected class is allowed for that element surrounding the selection, add the class directly it.

2) Activate the inline classes when I put my cursor somewhere inside an element and show me the classes allowed for this element (<b>wor|d</b>).

3) Let me select an element by tho bottom bar and add the chosen class to that one.

In general I think inlineCSS should behave like the one for paragraphs.

Regards, Uschi

(issue imported from #M6034)

Actions #1

Updated by Stanislas Rolland almost 17 years ago

Feature added in SVN TYPO3core trunk revision 2865.

Actions

Also available in: Atom PDF