You can control the behavior of the WYSIWYG editor in dotCMS by using the TinyMCE plugin. The plugin allows you to customize some of the default properties of the WYSIWYG editor to modify the look and feel, and define your own css file for the editor.
Note: Plugins are feature additions outside of the dotCMS core code and unless explicitly stated otherwise, are not covered under the dotCMS Enterprise warranty. However, support for plugins is available through our professional services department. Please contact us for more information.
To configure the plugin:
1. Download the TinyMCE plugin.
2. Install the plugin.
- Unzip the contents of the plugin zip file.
- Copy the org.dotcms.tinymce_extended directory from the zip file into your dotCMS plugins directory (i.e., plugins/org.dotcms.tinymce_extended).
3. Make sure the value of Enable GZIP is set to false.
4. Change configuration properties.
Edit the plugin.properties file (plugins/org.dotcms.tinymce_extended/conf/plugin.properties) to change the values for any of the following parameters:
|reload.force||Indicates whether the configuration properties are loaded just once|
|WYSIWYG_CSS||Path of the css file|
|WYSIWYG_THEME||Choose between “advanced” or “simple”|
|WYSIWYG_PLUGINS||List of the plugins enabled for the editor|
|WYSIWYG_BLOCKFORMATS||List of block formats available from the editor|
|WYSIWYG_PASTEUSEDIALOG||Enables or disables the dialog box that pops up when pasting content to the editor|
|WYSIWYG_DATEFORMAT||Date format used by the editor|
|WYSIWYG__TIMEFORMAT||Time format used by the editor|
|WYSIWYG_WIDTH||Width of the editor area|
|WYSIWYG_NUMBER_THEME_BUTTON||Number of rows where buttons can be arranged|
|WYSIWYG_THEME_BUTTON1||Buttons to appear on row #1|
|WYSIWYG_THEME_BUTTON2||Buttons to appear on row #2|
|WYSIWYG_THEME_BUTTON3||Buttons to appear on row #3|
6. Start dotCMS
Your WYSIWYG editor will now display using the options you set.
On some systems you may encounter an error similar to the following when trying to edit content in the WYSIWYG editor:
Unable to initialize WYSIWYG tinymce is not defined
This error occurs when compression of web pages is enabled in your application server.
Note: The Tomcat distribution that ships with dotCMS does not have compression enabled. You will only encounter this error if you add compression to the dotCMS Tomcat distribution or install dotCMS in an another application server which has compression enabled.
To solve the problem, disable compression on your application server. For example, to disable compression in Tomcat:
- Edit the Tomcat server.xml file (conf/server.xml in the Tomcat directory).
- Change the value of the compression property in the
<Connector>tag to off, similar to the following:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" compression="off" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml"/>