[opencms-dev] found it --- Re: Is the _styles.xml file ignored in tinyMCE?

Christian Steinert christian at christian-steinert.de
Thu Aug 16 06:25:46 CEST 2012


> Dear all
>
> we are currently in the process of migrating to tinyMCE. Overall I am very pleased so far but I noticed that the styles dropdown of tinyMCE will display all CSS styles that are in my custom CSS file and not just those that are listed in my foo.css_styles.xml.
>
> Does anybody know how I can get tinyMCE to only display those styles that I mention in the _styles.xml file?

Okay, I looked at the source code and I think I found it:

in the  configuration attribute of the FCKEditor widget one needs to add an option like the following
   stylesformat:</opencms/file/path.js>

The opencms file "/opencms/file/path.js" must contain a piece of javascript code as described on the page http://www.tinymce.com/wiki.php/Configuration:style_formats
Only a javascript array with the necessary values may be contained in the file - the prefix "style_formats : " is automatically added by opencms and may not be included in the file.

Maybe this helps somebody

Kind regards
Christian





More information about the opencms-dev mailing list