[TYPO3-rte] tinymce_rte: classes saved in database but are not rendered
Peter Schinken
typo3 at exclaim.de
Thu Jan 12 16:32:25 CET 2012
Hello,
after installing tinymce_rte (and removing rtehtmlarea) classes are not rendered on the page.
There is a class "abstract" for p-Tags. The RTE seems to be configured properly because the correct html (with class) is saved in the database.
When viewing the html output in the Frontend the class is removed.
I thought that
RTE.default.proc.allowedClasses = abstract
will do the job (I used that for rtehtmlarea) but that is not the case.
It would be great if someone has a hint!
That's my configuration:
RTE.default {
gzip = 1
gzipFileCache = 1
}
RTE.default.init {
# define a stylesheet
content_css = fileadmin/project/templates/stylesheets/rte_default.css
style_formats {
10 {
title = Überschrift 1
block = h1
}
20 {
title = Überschrift 2
block = h2
}
30 {
title = Überschrift 3
block = h3
}
40 {
title = Einleitungstext
block = p
classes = abstract
}
50 {
title = Info Box
block = div
classes = infobox
}
60 {
title = Download Box
block = div
classes = filelinks
}
70 {
title = Person/Visitenkarte
block = div
classes = person
}
80 {
title = Adresse
block = div
classes = address
}
}
plugins = safari,style,layer,table,advimage,advlink,inlinepopups,insertdatetime,media,searchreplace,contextmenu,paste,fullscreen,noneditable,nonbreaking,xhtmlxtras,typo3filemanager,visualchars
theme = advanced
theme_advanced_buttons1=styleselect,formatselect,undo,redo,cut,search,replace,anchor,link,unlink,spellchecker,hr,bold,italic,sub,sup,bullist,numlist,charmap,indent,outdent,cite,help
theme_advanced_buttons2=table,row_props,cell_props,delete_col,delete_row,delete_table,col_after,col_before,row_after,row_before,split_cells,merge_cells,visualaid,code,media,cleanup
theme_advanced_buttons3=
theme_advanced_buttons4=
plugins=contextmenu,tabfocus,searchreplace,advlink,spellchecker,xhtmlxtras,table,media
theme_advanced_statusbar_location = bottom
width = 600
height = 550
fix_table_elements = true
# you could override the following option if you don't want to insert links.
file_browser_callback = typo3filemanager
# This option enables you to specify that list elements UL/OL is to be converted to valid XHTML. This option is disabled by default.
fix_list_elements = true
# If you enable this option, class names placed in class attributes will be verified against the content CSS so elements with a class attribute containing a class that doesn't exist in the CSS will be removed.
verify_css_classes = true
# If disabled then normal cleanup will not be performed after wordpaste. This option is enabled by default.
paste_force_cleanup_wordpaste = true
# MSIE specific option, if you set this to true both Mozilla and MSIE will present a paste dialog. If you set it to false pasting in MSIE will be done directly. This option is set to true by default.
paste_use_dialog = true
# MSIE specific option. If you enable this feature, a word paste will be executed when the user copy/paste content to the editor. This feature is disabled by default.
paste_auto_cleanup_on_paste = true
# This enables you to control if the word parse operation should remove or keep span elements, they will be removed by default.
paste_remove_spans = true
# This enables you to control if the word parse operation should remove or keep style attributes, they will be removed by default.
paste_remove_styles = true
# This feature allows you to control whether or not class attributes are stripped when using pasteword. Valid values are:
# all - will strip all class attributes from the pasted content. This is the default value.
# none - will not strip any class attributes from the pasted content.
# mso - will strip out all of the class attribute values that start with "Mso", but retain all others.
paste_strip_class_attributes = all
# Additional config options for the "table" button.
# This option should contain a semicolon separated list of class titles and class names separated by =
# The titles are the ones that get presented to the user in the styles drop down list and and the class names is the classes that gets inserted.
table_styles = Zebra Spalten=zebracols;Zebra Reihen=zebrarows
# This option should contain a semicolon separated list of class titles and class names separated by =
# The titles are the ones that get presented to the user in the styles drop down list and and the class names is the classes that gets inserted.
# table_cell_styles = Header 1=header1;Header 2=header2;Header 3=header3;Table Cell=tableCel1
# This option should contain a semicolon separated list of class titles and class names separated by =
# The titles are the ones that get presented to the user in the styles drop down list and and the class names is the classes that gets inserted.
# table_row_styles = Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1
# Enables you to specify the max number of cells for a table.
table_cell_limit = 100
# Enables you to specify the max number of rows for a table.
table_row_limit = 100
# Enables you to specify the max number of columns for a table.
table_col_limit = 10
# Enables you to specify the default border value.
table_default_border = 0
# Enables you to specify the default cellpadding value.
table_default_cellpadding = 0
# Enables you to specify the default cellspacing value.
table_default_cellspacing = 0
# Additional config options for the "styleselect" button.
# This option should contain a semicolon separated list of class titles and class names separated by =. The titles will be presented to the user in the styles dropdown list and the class names will be inserted. If this option is not defined, TinyMCE imports the classes from the content_css.
# dont forget to set these classes in RTE.default.proc
# theme_advanced_styles = Download Box=filelinks;Einleitungstext=abstract;Person/Visitenkarte=person;Adresse=address;Info Box=infobox;Zitat=blockquote
# Additional config options for the "formatselect" button.
# This option should contain a comma separated list of formats that will be available in the format drop down list.
theme_advanced_blockformats = p,div,h1,h2,h3
# Additional config options for the "link" button.
# This option should contain a semicolon separated list of class titles and class names separated by =. The titles are the ones that get presented to the user in the styles drop down list and and the class names is the classes that gets inserted.
advlink_styles = interner Link=internal-link;externer Link=external-link;Download Link=download-link;E-Mail Link=mail-link;PDF Link=pdf-link
# This option should contain a semicolon separated list of link target titles and target names separated by =. The titles are the ones that get presented to the user in the link target drop down list and and the target names is the target that gets inserted as a target attribute.
theme_advanced_link_targets = Neues Fenster=_target
# Additional config options for the "image" button.
# This option enables you to control if the image dimensions should be updated with new data if the image src field is changed. This option is enabled by default.
advimage_update_dimensions_onchange = true
# Additional config options for the "media" button.
# True/false option that gives you the ability to have a JavaScript embed method instead of using object/embed tags. Defaults to: false
media_use_script = false
# True/false option that enables you to force Windows media player 6 compatiblity by returning that clsid, but some features and options for WMP may not work if you use this option. You can find a reference on these options at w3schools. Defaults to: false
media_wmp6_compatible = false
# Skips the loading of the default plugin CSS file, this can be useful if your content CSS already defined the media specific CSS information, Defaults to: false.
media_skip_plugin_css = false
# URL to a JS file containing files to be listed in the media dropdown list similar to the one found in the advimg dialog. The name of the array variable in the JS file should be "tinyMCEMediaList".
media_external_list_url
# Name/Value list of format mappings to file extensions. Defaults to: flash=swf;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram.
media_types = flash=swf;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram
# This option enables you to switch strict output on/off.
media_strict = false
# Additional config options for the "tabfocus" plugin.
# This option enables you to specify an element ID to focus, when the user pressed the tab key inside the editor. You can also use the special ":prev" and ":next" values. It will then places the focus on either the previous or next input element placed before/after the TinyMCE instance in the DOM.
# Move focus to next element in DOM
# tabfocus_elements = :prev,:next
#valid_elements = @[id|class|title],a[name|href|target], strong/b,em/i,strike,u,#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|alt=|title|width|height],-sub,-sup,-blockquote,-table[width|summary],-tr[rowspan],tbody,thead,tfoot,#td[colspan|rowspan|align|valign|scope],#th[colspan|rowspan|align|valign|scope],caption,-div,-span,address,-h1,-h2,-h3,hr,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value|_value],embed[type|width|height|src|*],col[alignspan|valign],colgroup[align|span|valign|width]
#extended_valid_elements = p[class<?abstract],div[class<infobox?address?filelinks?person]
}
# Default RTE processing rules
RTE.default.proc {
# tags die erlaubt / verboten sind
allowTags (
table, tbody, tr, th, td, caption, thead, h1, h2, h3, div, p, br, span, ul, ol, li, blockquote, strong, em, sub, sup, a, hr, cite, abbr, acronym
)
denyTags = font, b, i, u, center,strike, nobr, img
## br wird nicht zu p konvertiert
dontConvBRtoParagraph = 0
# tags sind erlaubt außerhalt von p, div
allowTagsOutside = hr, ul, ol, li, img, table, object, embed
# erlaubte attribute in p, div tags
keepPDIVattribs =
# html parser einstellungen
HTMLparser_rte {
# tags die erlaubt/verboten sind
allowTags < RTE.default.proc.allowTags
denyTags < RTE.default.proc.denyTags
# tags die untersagt sind
removeTags = font
# entfernt html-kommentare
removeComments = 1
# tags die nicht übereinstimmen werden nicht entfernt (protect / 1 / 0)
keepNonMatchedTags = 0
}
# Content to database
entryHTMLparser_db = 1
entryHTMLparser_db {
# tags die erlaubt/verboten sind
allowTags < RTE.default.proc.allowTags
denyTags < RTE.default.proc.denyTags
# CLEAN TAGS
noAttrib = b, i, u, strike, sub, sup, strong, em, quote, blockquote, cite, tt, br, center
rmTagIfNoAttrib = span,div,font
# htmlSpecialChars = 1
## align attribute werden erlaubt
tags {
p.fixAttrib.align.unset >
p.allowedAttribs = class
div.fixAttrib.align.unset >
hr.allowedAttribs = class
## replace b => strong, i => strong
## see also "exitHTMLparser_db"
b.remap = strong
i.remap = em
## img tags werden erlaubt
# img >
}
}
## replace b => strong, i => strong
exitHTMLparser_db = 1
exitHTMLparser_db {
tags.b.remap = strong
tags.i.remap = em
}
}
RTE.default.proc.allowedClasses = abstract
More information about the TYPO3-project-rte
mailing list