Skip Navigation
Expand
New Templates not showing in CKeditor
Answer ID 12327   |   Last Review Date 08/01/2022

Why is the Template list blank in a rich text authoring field?

Environment: 

This applies to the search when using Knowledge Advanced Authoring interface 22B

Issue: 

In 22.B you can now add your own templates.  If javascript is used in the template it could cause all the templates not to load.

To be able to add templates the SysAdmin needs to add that priviledge to a console role.

Resolution:

If CKEditor is not able to parse the template then there is a quote that needs to be escaped.
 
For Example:
<a class="expandable" href="javascript:void(0)" onclick="show_hide_byClass('click');" style="display: inline-block;">Click for image</a>
 
As is the template cannot be parsed by CKEditor code the templates are not loaded. 
 
To work around this issue we need to escape single quotes with \ in order to make it work .

For Example :
<a class="expandable" href="javascript:void(0)" onclick="show_hide_byClass('changeme');" style="display: inline-block;">Click for details</a>
 
HAS TO BE CHANGED AS BELOW
<a class="expandable" href="javascript:void(0)" onclick="show_hide_byClass(\'changeme\');" style="display: inline-block;">Click for details</a>
 
This is the only character that we know needs to be escaped.