How to create a custom configuration file for TinyMCE
Applies to
HCL Digital Experience v8.5 and later
Introduction
TinyMCE is a what-you-see-is-what-you-get (WYSIWYG) editor that you can use with HCL Digital Experience (DX). This article explains how to create a custom configuration file for the TinyMCE editor embedded in the HCL DX environment.
Instructions
Important
The Textbox.io component in HCL DX is deprecated as of January 31, 2023, and reached end of support (EOS) on January 31, 2024. Starting with CF208, you can use the TinyMCE editor as the embedded rich text editor. For more information, see Deprecated features.
Enabling TinyMCE
Before you use TinyMCE, add a custom property to the WCM WCMConfigService resource environment provider.
- Log in to the IBM WebSphere Integrated Solutions Console as an administrator.
- Go to Resources > Resource Environment > Resource Environment Providers > WCM WCMConfigService.
- Under Additional Properties, select Custom properties.
- Select New...
- In the Name field, enter
inplaceEdit.defaultRichTextEditor. - In the Value field, enter
TinyMCE. - Click Apply.
- Click Save at the top of the console messages.
Configuring HCL Web Content Manager to use the enhanced editor
Follow these steps to enable the enhanced editor in the authoring portlet:
- On the authoring portlet page, go to Preferences > Edit Shared Settings.
- Open the Editor Options menu.
- Click the Select the rich text editor to use in rich text fields dropdown and choose Enhanced Editor.
- Click OK.
Customizing the editor
These steps apply only to the enhanced editor used in the HCL WCM authoring portlet. In a clustered environment, perform these steps on the primary node only, then re-sync the cluster.
-
Create the custom configuration file.
The TinyMCE editor uses a custom configuration file named
tiny_config.jsp. Sample configurations are available in<PortalServer_root>/wcm/prereq.wcm/wcm/config/templates/shared/app/config/tinymce.- Navigate to
<wp_profile_root>/PortalServer/wcm/shared/app/config/and create a folder namedtinymce. - Locate the sample file in
<PortalServer_root>/wcm/prereq.wcm/wcm/config/templates/shared/app/config/tinymce/tiny_config.jsp. - Copy
tiny_config.jspfrom the sample location to your newtinymcefolder.
- Navigate to
-
Customize the configuration.
- Open the
tiny_config.jspfile you just copied in a text editor. - Customize the settings as needed. Use the available configuration options to enhance the rich text editing experience.
- Open the
-
Run the configuration command.
- Open a command prompt.
-
From the
<wp_profile_root>/ConfigEnginedirectory, run the following command to apply the changes made totiny_config.jsp:-
Windows
ConfigEngine.bat configure-wcm-ephox-editor-custom-configuration -DWasPassword=<password> -DPortalAdminId=<username> -DPortalAdminPwd=<password> -
UNIX or Linux
./ConfigEngine.sh configure-wcm-ephox-editor-custom-configuration -DWasPassword=<password> -DPortalAdminId=<username> -DPortalAdminPwd=<password>
You do not need to provide an administrator username or password if they are already specified in the
wkplc.propertiesfile. -
-
Restart the server.
Testing the configuration
Access HCL Web Content Manager (WCM), create or edit an HTML or rich text element, and verify that your custom configuration works as expected.
Note
Several TinyMCE defects have been fixed in the latest CF versions. For more information, see the Fixes integrated in HCL Digital Experience 8.5.0.0, 9.0, and 9.5 Combined Cumulative Fixes knowledge base article.