We updated to Vancouver and now when I edit a KB, extra junk html is added into the Source Code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2024 05:48 AM
When I put a hard space (hold shift down and press Enter) extra html is added into the source code. I like to keep the source code clean, because we do manage the html, so we use html and the gui side of SN to create kbs. We use the hard space between each step when writing out steps in articles, and we use a hard space above and below images. So we have tons of junk html with each hard space we use.
I have worked at other companies in Vancouver and never had this issue.
SN says it is an issue with the TinyMCE Library and refused to fix the issue, and pretty much told me it can't be fixed. In my opinion, this is not how a company should support their customers, close their ticket and not resolve the issue.
I have attached an image of the source code and highlighted the junk that was added when I put in the hard spaces.
If anyone has any information or advise, I greatly appreciate it. Thanks in advance.
- 2,214 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2024 05:15 PM
Because you mentioned the ul/ol thing, I thought I'd link you to a post I made a while back: TinyMCE bullet/numbered lists wrapping oddly
As for the formatting "junk", it does sometimes seem inconsistent but I think I mostly see it when someone has cut/pasted from Word or something. It does drive me nuts because our company fonts are not arial/geneva and so I have to strip it all out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2024 08:06 AM
Good work around, the inside/outside styling does not impact us fortunately. The problem we have is when uploading a word doc, the editor does not respect the <ol> and <ul> all the time. Despite using the default list options in the editor. For example I was told by SN that the open circle in an <ul> is not recognized or respected in the formatting. It will recognize the closed circle and the square though. We have better luck copy/pasting and selecting "keep formatting" as a workaround for the last 5 years.
For us the junk does and can come over from copy/pasting, but it is not the bulk of where it happens. Most of the time it appears while using the built in editor tools.
Do you use an external HTML editor such as notepad++? This can be helpful for bulk changes by doing a "find" and "replace all".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2024 08:29 AM
For our instance, our workflow is:
- Copy from Word
- Paste into KN and choose Remove Formatting
- Possibly select list and toggle off/toggle on and redo indentation levels. Pasting doesn't always capture it exactly and it's easier to redo
- Go into source code and remove unnecessary coding using Replace All
- Select what you want to remove
- Press Ctrl + Shift + R, the selection will be put into the Replace All field, press Enter to confirm selection
- In the With field, leave blank and press Enter - this will remove all matching selections throughout the code.
- Note: If any mistake is made during a find replace, press Ctrl + Z or the Undo button, either in the Source Code or the Article Body Editor.
We have a separate article on this Replace All technique with common selections/replaces and for us, it's best practice to do this as a final QA step before publishing. It seems like a lot but it becomes a quick final step.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2024 07:08 AM
That is basically what we do, except it happens with or without keep formatting selected. The problem at least in our situation the junk code varies enough from line to line that the replace all only captures that line of code, as the other lines vary enough that it becomes a line by line replacement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2024 01:47 PM
Travis,
There is a workaround for that (without a line by line replacement) and that is the Amaze application available through the ServiceNow Store. Amaze provides clean html and responsive styling without any coding. It's much simpler. Plus you have dozens of ready-made templates and other components available for use with intuitive, drag-and-drop capabilities. Check out Amaze at www.intellective.co/amaze.