Knowledge Base editor control adding unwanted inline style for Numbered and Bulleted lists

nikkit
Tera Contributor

So, I'm really spinning my wheels trying to figure this out, so now I'm here hoping someone can give me some ideas of where to go from here. 

I admit, I'm not great at navigating my way through ServiceNow and have a hard time finding anything so "ServiceNow for Bone-Heads"  instructions are welcomed (I have full Administrator access to the platform). 

I'm working on writing and building our KB for our company. 

  1. I click in the Article Body field, 
  2. Then, click the Numbered List icon on the text editor. 
  3. I type the list items. 
  4. When I go to look at the Code-behind, I see the <ol> tag is being inserted as: <ol style="list-style-position: inside;"> (the reason I dislike the "inside" position is because it wraps the test weirdly under the number bullets)
  5. When I click the Numbered list icon, I want the default action to be <ol> without the inline style.
How in the heck do I change the default style for this button? Additionally, would I be able to change other defaults such as the default font face and size for all articles?   

Screen shot showing exactly the problem.

9 REPLIES 9

Kim27
Tera Guru

Is THAT what makes the text wrap under the number? This has also frustrated me because it makes the list more difficult to follow. Thanks for posting this, Let's hope there's a response that fixes it! 

Lorenzo Stermie
Kilo Guru

Hello Nikkit,
The short answer to your post is that the HTML encoding of what you are writing is done by the WizWig editor.

The workaround is to write your HTML code on another platform then copy paste the HTML code (be careful not to use code that will be scrubbed)

 

While I was looking at how to answer your post I also came across this post:
https://community.servicenow.com/community?id=community_question&sys_id=2fba436ddb5cdbc01dcaf3231f96...

It looks like there is a way you can replace the WizWig editor, I'm curious to try that on my personal dev but I have a feeling that it may be more complicated than it looks, my main concern is that it may try to encode using HTML codes that ServiceNow will then sanitize.

Hope this helps

Lorenzo

nikkit
Tera Contributor
I understand the WYSIWYG editor is placing the code into the control. But there just has to be a way to control the style. ServiceNow is doing it here (see image below). If you create an OL or UL list here... you will see the code is just <ul> or <ol> without the inline style. 🙂 
 
Unfortunately the article posted is over 7 years old and I don't think its relevant any longer 😞 
 
My big issue is that I have to hand this created KB over to a group who has to create and update articles when I'm gone. They aren't coders, they don't know HTML, and I can't ask them to go in and change the code. I have to show them how to create an article using only the controls available and have them come out in the standard style. 
 
And Kim, it is what causes that horrible bullet under-wrap. It's SO hard to read! You can see that this editor we're typing in right now inserts the tag correctly without the inline style. 
  1. Item One
  2. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Morbi quis commodo odio aenean sed adipiscing diam donec. Ultrices neque ornare aenean euismod elementum nisi quis.
  3. Item Three

    find_real_file.png
 

Brad_B
Tera Contributor

Did anyone ever resolve this issue? 

We are new to ServiceNow and the "inside" list style that is added by the SN HTML editor is a big complaint for users and makes it harder to read. 

This is not default HTML behavior.  Seems like they should just use standard <ul> and <ol> tags without enforcing a style to all bulleted and numbered lists that doesn't align with standard HTML best practices.