Bug #17797
closedRTE's classesTable works in BE but drops classes in FE
0%
Description
I added css styles to the table properties dialog of the RTE (in my special case to have tables stretch to 100% / 50% / ... of the available width).
The styles appear in the selector box of the table properties dialog and work perfectly in the backend (table stretches horizontally).
The class is also written to db and persists when saving and reediting - anything as expected so far.
When such a table is shown in the frontend the class attribute that has been attached to the table tag is dropped. It does not make it into the HTML output.
To make sure I did not overlook something, I used the same methods to add the class attribute to P tags and TD tags - both work perfectly in BE and FE. The FE problem is special to the TABLE tag.
The attached examples also implement a width50-Class for the P tag to show that this works nicely.
Typo3 4.1.2
RTE 1.5.3
German language for editors
FE/BE Charset: UTF-8
PHP 5.2.3
See attached files and Page TSconfig below to reproduce configuration.
----------
Page TSconfig:
----------
- RTE config
- show some additional buttons that are not part of the default set:
RTE.default.showButtons := addToList( underline, strikethrough, left, center, right, line, findreplace, showhelp, copy, cut, paste, textcolor ) - allow additional tags needed for the above additional buttons
RTE.default.removeTags := removeFromList( strike, u)
RTE.default.proc.entryHTMLparser_db.removeTags := removeFromList( strike, u)
- limit size of plain images inserted with RTE's image button
RTE.default.buttons.image.options.plain.maxWidth = 370
RTE.default.buttons.image.options.plain.maxHeight = 800 - limit size of magic images inserted with RTE's image button
RTE.default.buttons.image.options.magic.maxWidth = 370
RTE.default.buttons.image.options.magic.maxHeight = 800
RTE.default.useCSS = 0
- enable various table tools in RTE
RTE.default.disableAlignmentFieldsetInTableOperations = 0
RTE.default.disableSpacingFieldsetInTableOperations = 0
RTE.default.disableColorFieldsetInTableOperations = 0
RTE.default.disableLayoutFieldsetInTableOperations = 0
RTE.default.disableBordersFieldsetInTableOperations = 0
- add some of our own custom classes to RTE
- use our own css file - dynamicCss plugin reads the available classes from there!
RTE.default.contentCSS = fileadmin/templates/herrenchor/css/dynamiccss.css
- add our custom classes for the right elements
- (classesCharacter, classesParagraph, classesTable, classesTD, classesImage)
RTE.default.classesParagraph := addToList( width50 )
RTE.default.classesTable := addToList( width100, width67, width50, width33, width25 )
RTE.default.classesTD := addToList( width100, width67, width50, width33, width25 ) - ...and to the list of allowed classes
RTE.default.proc.allowedClasses := addToList( width100, width67, width50, width33, width25 )
- define what will be shown in RTE's dropdown boxes
RTE.classes.width100 {
name = LLL:fileadmin/labels/dynamiccss.xml:width100
}
RTE.classes.width67 {
name = LLL:fileadmin/labels/dynamiccss.xml:width67
}
RTE.classes.width50 {
name = LLL:fileadmin/labels/dynamiccss.xml:width50
}
RTE.classes.width33 {
name = LLL:fileadmin/labels/dynamiccss.xml:width33
}
RTE.classes.width25 {
name = LLL:fileadmin/labels/dynamiccss.xml:width25
}
- Get rid of some demo classes that we do not need
RTE.default.classesParagraph := removeFromList( csc-frame-frame1, csc-frame-frame2 )
RTE.default.classesTable := removeFromList( csc-frame-frame1, csc-frame-frame2 )
RTE.default.classesTD := removeFromList( csc-frame-frame1, csc-frame-frame2 )
RTE.default.proc.allowedClasses .= removeFromList( csc-frame-frame1, csc-frame-frame2 )
- Copy all changes also to settings for FE editing
RTE.default.FE.proc < RTE.default.proc
RTE.default.FE < RTE.default - Remove the recursive copy created by the last command above
RTE.default.FE.FE >
#####
(issue imported from #M6730)
Files
Updated by Stanislas Rolland about 17 years ago
Updated by Jörg Wagner about 17 years ago
This solution works! Thanks a lot, Stanislas.