New text editor in the Web Client (#634544)
The text editor in the Web Client has been enhanced. The user interface has been improved in terms of visual presentation and usability. The new editor is used for creating and editing comments, writing emails and creating and editing text templates.
The system property cmweb-server-adapter, tinymce.enabled has been introduced to switch between the old and the new editor. By default, it is set to false, meaning that the new editor is used. You can set the property to true to switch back to the old editor.
The behavior of placeholders when using text templates for writing comments or emails has been changed in both editors. It is not possible anymore to type within the placeholder text in brackets. When moving the cursor to the placeholder, it is selected, so the user can remove it if desired.
The page customization attributes of the type cmRichTextEditor have been adapted to support the new editor.
The following attributes apply to both editors:
- font (sets the font style)
- fontSizeValue (sets the default font size)
The following attributes are only relevant for the old editor:
- editorFeatures (replaced by the setting toolbarButtons in the configuration attribute of the new editor)
- editorFonts (replaced by the setting fontFamily in the configuration attribute of the new editor)
- fontSizeValues (replaced by the setting fontSize in the configuration attribute of the new editor)
The following attribute was added for the new editor:
- configuration (configuration of the editor in JSON format, see https://www.froala.com/wysiwyg-editor/v2.0/docs/options for all the options)
The following table provides a mapping of the values of the attribute editorFeatures of the old editor to values in the attribute configuration, item toolbarButtons of the new editor:
TinyMCE |
Froala |
Comment |
---|---|---|
SUB_SUP |
subscript, superscript |
|
INDENTS |
indent, outdent |
|
LISTS |
formatOL, formatUL |
|
TABLES |
insertTable |
|
INSERT |
insertImage, insertTable, insertLink |
|
INSERT_EMOTICON |
emoticons |
currently not supported in Froala |
INSERT_CHAR |
specialCharacters |
|
INSERT_IMAGE |
insertImage |
|
INSERT_LINK |
insertLink |
|
A task script to map existing page customizations for TinyMCE to Froala is available. Please consider the following with regards to this script:
- The script does not overwrite existing page customizations for Froala. If you entered some page customizations for Froala manually before executing the script, the script will not make any changes and you need to add the remaining page customizations manually.
- The script only considers page customizations which are entered in the Web Client. If the page customizations are provided by script, this script needs to be adjusted for Froala manually.
- After executing the script, the ConSol CM server needs to be restarted for the changes to become active.
Please ask you ConSol CM consultant or the ConSol CM support to obtain a copy of the script.
It is not possible to copy & paste images from rich text fields.
Templates are always inserted in the beginning of the editor.
Example configuration provided via script
You can provide the page customizations via script instead of entering them in the page customization of the Web Client. The following code example shows a page customization configuration for Froala:
'''
[configuration : '{"toolbarButtons": ["bold","italic","underline","strikeThrough","|","align","|","paragraphFormat","fontFamily","fontSize","color","-","subscript","superscript","|","|","|"],"fontFamily":{"courier":"Courier Font","arial":"Arial Font","verdana":"Verdana Font","tahoma":"Tahoma font"},
"fontSize":["8","10","12"]}', font: "arial", fontSizeValue:"10pt"
]
'''