Need to customize TinyMCE Editor buttons in Service Portal toolbars (they appear hard-coded)

Matt S6
Tera Contributor

ServiceNow has a number of TinyMCE system properties, available in sys_properties.list, that allow customizing the toolbars in the TinyMCE editor. If you filter by "*glide.ui.html.editor" you'll find a suite of properties for customizing the HTML and TinyMCE editor toolbars, fonts, etc.

 

Service Portal/Employee Center appears to ignore ALL of these properties. Instead, it appears these properties are hard-coded in <instance_name>/scripts/js_includes_sp.jsx. Many OOB widgets utilize the <sp-tinymce-editor> directive, and that directive seems to call back to the js_includes_sp.jsx.

 

We have an approach of "don't customize for the sake of customizing" and "use out-of-the-box" as much as possible. So we try to avoid cloning/customizing widgets, etc. and utilize the OOB functionality. Changing the values of a property, for example, such as to add new font choices, add the ability to underline, etc. seems to be a much safer way of customizing the user experience rather than cloning/customizing widgets.

 

Unfortunately it seems the TinyMCE editor in Portal/Employee Center is locked and cannot be configured via any properties. Is there any way to write a small JS-include or Angular directive to override or "inject" additional properties when a widget is entered? For example, so we can add underline or font selection to TinyMCE?

 

In the Portal/Employee Center UI here is what team members see (very limited options):

MattS6_0-1688051876830.png

 

In the Platform (aka Native or Desktop) UI, many more options are available:

MattS6_1-1688051920413.png

 

6 REPLIES 6

Hi Hannes. Have you tried using the following? This can be placed in an angularjs directive for reusability and you can simply pass in the options you need via $scope.mceOptions.

 

<textarea ui-tinymce="mceOptions" ng-model="model">{{model}}</textarea>

SiddheshPaw
Tera Guru

Hello @David Galagarza 

Could you please elaborate your answer as I did not understand what you are trying to say here. I am still facing the same issue.