How to configure tinyMCE?

Forum to discuss the new web client version of Servoy.

How to configure tinyMCE?

Postby roddy » Tue Jun 07, 2022 5:29 am

Does anyone have any information on how to configure the tinyMCE options in Servoy? The link from the https://wiki.servoy.com/display/DOCS/UI ... FIGURATION page doesn't link to anything except the home page and I have no idea how the Servoy wrapper around this component works or what is available for us to configure or how to set anything.

I could not figure out where to start with the documentation at: https://www.tiny.cloud/docs/tinymce/6/e ... t-options/

The documentation I could work out doesn't seem to work with the examples in Servoy; fontfamily and fontsize do not work and styles from the tinyMCE docs is styleselect in Servoy. So trying the command below in the onShow() does not work for the fonts.
Code: Select all
elements.htmlarea_1.putClientProperty(APP_UI_PROPERTY.HTML_EDITOR_CONFIGURATION, '{"toolbar": "undo redo | fontfamily fontsize | bold italic underline | alignleft aligncenter alignright alignjustify"}');

Calling getClientProperty() on an existing HTML area returns null.

Any assistance would be gratefully received, especially with some possible examples?

Thanks,
roddy
 
Posts: 100
Joined: Mon Oct 26, 2020 12:32 am

Re: How to configure tinyMCE?

Postby roddy » Tue Jun 07, 2022 6:06 am

For those also having issues; Servoy seems to be using version 4 of tinyMCE. The documentation can be found at: https://www.tiny.cloud/docs-4x/advanced ... arcontrols

This will list the available options that you can use with the following, which I have put in onShow() as firstShow only:
Code: Select all
   if (firstShow)
   {
      elements.html_area_1.putClientProperty(APP_UI_PROPERTY.HTML_EDITOR_CONFIGURATION, '{"toolbar": "undo redo | fontselect fontsizeselect | bold italic underline | alignleft aligncenter alignright alignjustify"}');
   }
roddy
 
Posts: 100
Joined: Mon Oct 26, 2020 12:32 am


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 5 guests