Project

General

Profile

Actions

Bug #17797

closed

RTE's classesTable works in BE but drops classes in FE

Added by Jörg Wagner about 17 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Should have
Category:
-
Target version:
-
Start date:
2007-11-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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:
----------

  1. RTE config
  1. 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 )
  2. allow additional tags needed for the above additional buttons
    RTE.default.removeTags := removeFromList( strike, u)
    RTE.default.proc.entryHTMLparser_db.removeTags := removeFromList( strike, u)
  1. 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
  2. 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

  1. 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
  1. add some of our own custom classes to RTE
  1. use our own css file - dynamicCss plugin reads the available classes from there!
    RTE.default.contentCSS = fileadmin/templates/herrenchor/css/dynamiccss.css
  1. add our custom classes for the right elements
  2. (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 )
  3. ...and to the list of allowed classes
    RTE.default.proc.allowedClasses := addToList( width100, width67, width50, width33, width25 )
  1. 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
    }
  1. 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 )
  1. Copy all changes also to settings for FE editing
    RTE.default.FE.proc < RTE.default.proc
    RTE.default.FE < RTE.default
  2. Remove the recursive copy created by the last command above
    RTE.default.FE.FE >

#####
(issue imported from #M6730)


Files

configFiles.zip (1.38 KB) configFiles.zip Administrator Admin, 2007-11-16 13:07
Actions

Also available in: Atom PDF