How do I add font sizes to the HTML field?

Carl Fransen1
Tera Guru

Hi Team,

Hoping a simple one for you all today.  I would like to add a number of 'font sizes' to the HTML field dropdown - I can add new fonts by updating a property, but haven't found where I can the sizes?

OOTB the sizes seem random - as you can see if you create a question, or reply, it he community itself, the sizes go from 18pt to 24 pt, I'd like to add the 20 and 22pt fonts to this list.

Any help is appreciated.

 

Cheers

Carl.

1 ACCEPTED SOLUTION

Carl Fransen1
Tera Guru

Hi All,

I logged this with HI and their answer is below:

After further looking into this, I am afraid to say that unfortunately, the configuration of the TinyMCE editor is not customizable on our end. The version of TinyMCE (v4) only has a pre-defined set of font sizes to choose from. Tiny MCE Madrid Documentation: https://docs.servicenow.com/bundle/madrid-platform-administration/page/use/using-forms/concept/c_UseHTMLFields.html You can manually set this from source code, by clicking on the "<>" icon. This could be a great candidate for a enhancement request. I can open up a enhancement request for the you, however it carries more weight when a customer opens the request. The reason is you have more detailed information on the use case and business case that the form asks.

It would be great if others could also log Enhancement Requests for this issue so we can have more customer requesting this functionality in a future version.

 

Thanks

Carl.

View solution in original post

10 REPLIES 10

Raj68
Mega Guru

Hi Carl,

Go through below link:

https://community.servicenow.com/community?id=community_question&sys_id=822b47eddb5cdbc01dcaf3231f9619c8

There are two different types of editors.  htmlArea and TinyMCE.  You really want to use the TinyMCE editor, that has a lot more options than htmlArea.  

TinyMCE is open source editor, "the most advanced WYSWIYG HTML editor"" as their site indicates!

Switch to TinyMCE

In order to switch to TinyMCE, you adjust the Property, glide.ui.html.editor, and set to tinymce.  Be warned that you should try this in a development instance first.  Converting to TinyMCE from htmlArea may mean that you will need to redo images.  If you have a lot of KB articles with images that use htmlArea, this can be a lot of work.  

Add Buttons to TinyMCE

  1. How to add addtional buttons to TinyMCE.
  2. Type  sys_properties.list in the left navigator bar
  3. Search for glide.ui.html.editor.toolbar.line
  4. Adjust line1 and line2 as desired.  Here is my favorite setup (however it takes up more space in the editor)
glide.ui.html.editor.v4.toolbar.line1

bold,italic,underline,strikethrough,undo,redo,|,fontselect,fontsizeselect,formatselect,table,|,forecolor,backcolor,link,unlink,|,alignleft,aligncenter,alignright,|,outdent,indent,|,bullist,numlist,blockquote,hr,|,image,media,code,|,visualblocks,spellchecker,preview,fullscreen

Issues with HTML Fields

Why not just convert all the text areas in ServiceNow to HTML fields instead?  There are some obstacles.

  • Activity Feed.  Activity feed doesn't render HTML changes correctly
  • Email.  Email may not display html information correctly without configuration.
  • More Space.  More space is need to store HTML data.  Although this is minor perhaps.
  • Form Size.  Forms are bigger with HTML fields.

NOTE: Mark correct or helpful if it helps you.

Warm Regards,

Raj patel

Hi Raj,

Thanks for our reply although it doesn't answer my question... 😞

I'm already using the TinyMCE editor and have also added extra fonts, all I need now is the ability to add additional font sizes.

 

Cheers

Carl.

I found these. Might help?

https://community.servicenow.com/community?id=community_question&sys_id=993904eddb6adb40feb1a851ca961926

https://community.servicenow.com/community?id=community_question&sys_id=94c68f65db1cdbc01dcaf3231f9619fa


Please mark my response as correct and helpful if it helped solved your question.
-Thanks

Thanks for your help with this - those articles match my issue exactly however unfortunately they have not provided any answers to this dilemma!

 

Cheers

Carl.