Fix for article editor removing a script

The article editor does its best to ensure that you have valid HTML in your article. Unfortunately, sometimes it can be a little heavy-handed with how it interprets "valid" HTML. Sometimes, it can remove a custom script you've added.

We've seen this happen most often with scripts that use their own HTML tags, such as:

  • Tableau
  • Redocly

As a workaround to this issue, you can:

  1. Create a snippet to put the script into.
  2. When you are creating the snippet, select the dropdown next to Snippet Content and select Code Editor instead of WYSIWYG Editor:
    Select Code Editor from the Snippet Content dropdown
  3. Paste your script in.
  4. Keep the snippet in Code Editor whenever you open it. This particular Code Editor bypasses all of the HTML-cleaning functions that the WYSIWYG Editor has, so your script will stay whole and functional.
  5. Once you've finished creating the snippet, you can insert that snippet into any article where you need the script to run.

You can see more how to set this up in our Wisdom Wednesday recording on the topic (this particular solution is the third and final use case discussed in that video!)