Code view lets you inspect and edit an article's underlying HTML directly in the Advanced WYSIWYG editor, giving you control over markup the visual editor cannot expose. Use it when you need to paste a code snippet, apply an inline style, or fix markup the editor has flagged. Changes you make in Code view are applied to the article as soon as you switch back to the visual editor.
NOTE
The unified Editor is rolled out in phases and is currently available in projects created on or after November 23, 2026. Projects created earlier continue to use the Advanced WYSIWYG editor and the Markdown editor. We're working to make it available to all projects soon.

Work with the article source in the unified Editor
The unified Editor does not have Code view. In the unified Editor, select Markdown view () in the article header to see and edit the article as Markdown, including any HTML. Markdown view is a single pane with no side-by-side preview. Select Markdown view () again to return to Block view. For more information, read Unified Editor.
The rest of this article describes Code view in the Advanced WYSIWYG editor and does not apply to the unified Editor.
When to use Code view
Use Code view in the Advanced WYSIWYG editor when you need to:
- Insert custom HTML elements the visual toolbar does not support.
- Apply an inline style to a specific element, such as a custom hyperlink size.
- Embed FontAwesome or other icon snippets.
- Add symbols or icons inside table cells.
- Paste an HTML block that relies on a class you defined in Custom CSS.
- Fix unsupported tag errors the editor has flagged.
Before you begin
- You need edit permissions on the article.
- Your project must use the Advanced WYSIWYG editor. Code view does not exist in the Markdown editor or the unified Editor.
- Only one contributor can have Code view open on an article at a time. Check whether a colleague is already in it before you start.
How to open and close Code view
Select the Code view toggle in the Advanced WYSIWYG editor to switch from the visual editor to the HTML source. Select it again to return to the visual editor, which saves your changes at the same time.
Switching from Code view back to the visual editor is what triggers the save. Do not navigate away from the article while you are still in Code view, because unsaved changes are lost.
Because collaborative editing is on by default in the Advanced WYSIWYG editor, manual save with Ctrl + S is not available from Code view. Once you have switched back and the article has saved, you can preview the content on the knowledge base site and publish as usual.
If another contributor joins while you are in Code view
In the Advanced WYSIWYG editor, the Code view toggle stops working when another contributor joins, so you cannot switch back to the visual editor the usual way. To exit, select Close near Workflow status, then reopen the article to continue editing.

Searching and formatting within Code view
In the Advanced WYSIWYG editor, Code view has a built-in search for finding specific HTML elements or text, and a shortcut for tidying up indentation.
| Action | Shortcut |
|---|---|
| Open search | Ctrl + F |
| Next result | Enter |
| Previous result | Shift + Enter |
| Auto-indent and format code | Shift + Tab |
The Advanced WYSIWYG editor also standardizes indentation and spacing automatically each time you open Code view. This runs on entry only, not on save or publish, and it does not alter custom HTML or script blocks.
Supported tags
Code view in the Advanced WYSIWYG editor supports the following tags.
Text formatting
- Abbreviations (
<abbr>) - Blockquote (
<blockquote>) - Headings (
<h2>to<h6>) - Paragraph (
<p>) - Subscript and superscript (
<sub>,<sup>) - Inline code (
<code>)
Structure and media
- Images (
<img>) - Links (
<a>,<a id="...">,<a class="..." href="" target="_blank">) - Tables (
<table>,<tr>,<td>,<colgroup>) - Lists (
<ul>,<ol>,<li>) - Dividers (
<hr>) - Embeds (
<iframe>) for embedding external or self-hosted content; see Embedding external content - Spans and divs with supported attributes
Inline formatting
- Bold, italic, underline (
<strong>,<em>,<u>) - Line break (
<br>) - Span (
<span>) - Anchor name (
<a name="...">) - Form select (
<select>)
Unsupported HTML tags and attributes
The Advanced WYSIWYG editor flags unsupported tags and attributes rather than removing them, so you can review and correct them in Code view.
When flagging happens
- When you switch an article from the WYSIWYG editor to the Advanced WYSIWYG editor, unsupported content is flagged automatically. Common tags such as
<sup>,<a name="...">,<select>,<colgroup>, and<img>are handled for you, so they are ignored during wrapper addition and do not trigger a flag. - When you add unsupported tags or attributes directly in Code view, the Advanced WYSIWYG editor flags them as it parses your changes.
What the editor does
In the Advanced WYSIWYG editor, flagging works as follows:
- Detects unsupported tags such as
<marquee>and<blink>, and unsupported attributes such asonmouseoverandstyle="text-decoration:blink". - Marks flagged elements with tooltips and block highlights, without disrupting the surrounding content.
- Blocks visual editing of a flagged element until you resolve it.
Flagged elements can be modified, removed, or corrected directly in Code view.
Considerations
| Item | Detail |
|---|---|
| One contributor at a time | Only one person can have Code view open on an article. If someone else is already in it, you cannot open it, but you can keep editing in the visual editor while you wait. |
| Manual save | Ctrl + S does not save from Code view. Switch back to the visual editor to save. |
| Exiting during collaboration | If another contributor joins while you are in Code view, the toggle stops working. Exit with Close near Workflow status. |
| Flagged elements | An element with an unsupported tag or attribute cannot be edited visually until it is corrected in Code view. |
| Other editors | Code view does not exist in the Markdown editor or the unified Editor. In the unified Editor, use Markdown view instead. |
Best practices
- In the Advanced WYSIWYG editor, reach for Code view only when the visual editor cannot do the job. Editing HTML directly raises the risk of unsupported tags and broken markup.
- Check whether a colleague already has Code view open before you try. Only one person can be in it at a time.
- Stick to supported tags when writing or pasting HTML. Unsupported tags are flagged and block visual editing of that section until corrected.
- Press
Shift + Tabto reformat after editing, so the markup stays readable. - Switch back to the visual editor as soon as you finish, because that is what saves your work.
- Resolve flagged elements promptly. Leaving them unresolved blocks visual editing of that block and can cause unexpected rendering on publish.
FAQ
Why can I not open Code view?
In the Advanced WYSIWYG editor, another contributor already has Code view open on that article. Only one person can use it at a time. You can carry on editing in the visual editor and try again once they have finished.
Why does Ctrl + S not save my changes in Code view?
In the Advanced WYSIWYG editor, manual save is not available from Code view. Switch back to the visual editor instead, which saves your changes automatically.
I am stuck in Code view and the toggle will not work. What do I do?
Another contributor has joined the article. Select Close near Workflow status, then reopen the article to continue editing.
Where is Code view in the unified Editor?
The unified Editor does not have Code view. Select Markdown view (</>) in the article header to see and edit the article source, including any HTML. Select it again to return to Block view.