[TYPO3-rte] RTE div nesting and exclusive classes

Stanislas Rolland typo3 at sjbr.ca
Wed Aug 17 16:42:42 CEST 2011


Hi Peter,
>
> I configured the RTE that there are several block styles for div containers.
> All persons I showed the workflow for using them are confused a lot and I ask myself if there is a better configuration.
>
> * the user types text
> * the user marks the text
> * the user chooses div
> * the user chooses a block style for div
>
> Is there a possibility to prevent the user to add multiple block styles?

In general, no. But you can prevent assigning multiple classes from 
lists of mutually exclusive classes.
  I tried it with (does not work):
>
> RTE.mutuallyExclusiveClasses := addToList(filelinks)
> RTE.mutuallyExclusiveClasses := addToList(person)
>
Try

RTE.mutuallyExclusiveClasses.divs = filelinks,person,etc

Then, assigning a class from this list should remove any other class in 
the list.

> Is it possible to prevent nesting divs?

I don't think there is.

There is always confusion if the user wants to change the block style 
but instead adds another style. So the user needs to choose "Remove 
block style" first and then add a new block style.

You do not need to mark the text to apply the style to the div. 
Positioning the cursor inside the div is sufficient.

The user does not know what styles are assigned.

In the status bar below the editing area, when the cursor is positioned 
inside an element, the classes assigned to the element are listed. The 
"Remove block style" option removes the last class assigned.

Perhaps using paragraphs rather than div's would be easier. Paragraphs 
are not nested.

Kind regards,
Stanislas


More information about the TYPO3-project-rte mailing list