Using the source code editor

Plan requirement

Subscription Suite Team or higher, Knowledge Professional or higher
Access Agent

Editing the HTML directly: the fastest way to fix a mess and the fastest way to make one. Hand-added styling disappears when somebody edits visually.

Open it

  1. Open the article for editing.
  2. Switch to the source view from the editor's toolbar.
  3. Edit the markup.
  4. Switch back and check the result before saving.

There is a second way in that suits different work. An HTML block, from Article components, holds one piece of complicated markup inside an otherwise ordinary article, so you can keep a table or a widget as code without opening the whole article's source every time you edit a paragraph.

What it is genuinely good for

  • Stripping inherited formatting from a paste, where the visual editor keeps putting it back.
  • Fixing a broken list or table that cannot be repaired by clicking.
  • Checking what is there, which is often not what the visual editor suggests.

Keep it plain

Headings, paragraphs, lists, links, tables and images. That set carries almost every article, works in every theme, translates cleanly and stays readable on a phone.

Inline styles and layout markup added by hand survive until somebody edits the article visually, and then they are gone or, worse, half gone.

Scripts do not run

Article bodies are cleaned when saved, and script tags are among the things removed. If an embed needs a script, it belongs in the theme.

Always look before saving

Switch back to the visual view. Unclosed tags do not always announce themselves in source, and they show up immediately as the layout collapsing.

See also

Was this article helpful?

0

Still stuck?

Our support team will take a look with you.

Comments

0 comments

Article is closed for comments.