Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Update TinyMCE Toolbar system properties

shrutijibhekar
Tera Contributor

 

Hello @all 

 

I’m trying to update the following system properties:

  • glide.ui.html.editor.v4.toolbar.line1

  • glide.ui.html.editor.v4.toolbar.line2

  • glide.ui.html.editor.v4.valid.buttons

However, after adding the values, I’m not seeing any changes reflected in Knowledge Base articles.

I also tried updating dictionary attributes, but that approach only works for a single article. I need a solution that applies consistently across all articles.

 

 

Has anyone encountered this before or knows how to make these changes effective globally?

 

Any guidance would be appreciated. 

Thank you!

1 ACCEPTED SOLUTION

Naveen20
ServiceNow Employee

 

HTMLSanitizerConfig is NOT for toolbar customization

This script include controls what HTML markup is allowed to persist when content is saved — it's a sanitization layer, not an editor configuration layer. Its job is to whitelist or blacklist specific HTML tags and attributes so they don't get stripped on save. For example, if you embed an <iframe> in an article and it disappears after saving, you'd whitelist it here.

It has no influence on which buttons appear in the TinyMCE toolbar. That's why your changes there had no effect on the editor UI.

When you would use HTMLSanitizerConfig:

  • You add a toolbar button (like "Embed Media") via attributes, the button shows up, you insert content, but the HTML gets stripped on save — then you'd whitelist those tags here.
  • A user pastes HTML with style or class attributes and they're being removed — you'd whitelist those attributes in globalAttributes.

So think of it as a two-layer system: the toolbar attributes control what the editor offers, and the sanitizer controls what the platform preserves.

Yes, updating dictionary attributes is the correct and supported approach

It's the standard way to customize the Knowledge editor toolbar globally. To summarize your action plan:

  1. Identify all kb_knowledge child tables using sys_dictionary.do?sysparm_query=element=text^nameLIKEkb_knowledge^internal_type=html
  2. Update the Attributes on each dictionary entry to include your toolbar config
  3. Flush cache via cache.do

And then if you find that certain HTML elements you're inserting via those toolbar buttons are getting stripped on save — that's when you come back to HTMLSanitizerConfig and whitelist those elements.

View solution in original post

5 REPLIES 5

Naveen20
ServiceNow Employee

 

HTMLSanitizerConfig is NOT for toolbar customization

This script include controls what HTML markup is allowed to persist when content is saved — it's a sanitization layer, not an editor configuration layer. Its job is to whitelist or blacklist specific HTML tags and attributes so they don't get stripped on save. For example, if you embed an <iframe> in an article and it disappears after saving, you'd whitelist it here.

It has no influence on which buttons appear in the TinyMCE toolbar. That's why your changes there had no effect on the editor UI.

When you would use HTMLSanitizerConfig:

  • You add a toolbar button (like "Embed Media") via attributes, the button shows up, you insert content, but the HTML gets stripped on save — then you'd whitelist those tags here.
  • A user pastes HTML with style or class attributes and they're being removed — you'd whitelist those attributes in globalAttributes.

So think of it as a two-layer system: the toolbar attributes control what the editor offers, and the sanitizer controls what the platform preserves.

Yes, updating dictionary attributes is the correct and supported approach

It's the standard way to customize the Knowledge editor toolbar globally. To summarize your action plan:

  1. Identify all kb_knowledge child tables using sys_dictionary.do?sysparm_query=element=text^nameLIKEkb_knowledge^internal_type=html
  2. Update the Attributes on each dictionary entry to include your toolbar config
  3. Flush cache via cache.do

And then if you find that certain HTML elements you're inserting via those toolbar buttons are getting stripped on save — that's when you come back to HTMLSanitizerConfig and whitelist those elements.