Accessibility links

Breaking News

Inserting HTML code in CKEditor

This article explains how to insert and edit HTML code using CKEditor.

NOTE: For general information about CKEditor, refer to the alternative article below:

What's inside this article:

Insert or edit HTML code

IMPORTANT: For security reasons, certain HTML elements and attributes are forbidden. When you try and insert forbidden HTML code into CKEditor, you see a validation error. The validation error lists each forbidden item that has been identified in the current code. You need to remove the listed items before you can apply the code.

Follow these steps to insert HTML code into CKEditor:

  1. Click the Source Code View icon.
  2. Add or edit the HTML code in the HTML code box.
  3. Click Apply.

If CKEditor does not find forbidden elements or attributes, the Source Code View dialog closes and the code is rendered on the main edit screen.

If you see a validation error, refer to the section below.

Manage validation errors

If CKEditor finds forbidden code, you see a validation error that lists the forbidden elements and attributes.

Follow the steps below to clean up and apply the code:

  1. Click Clean up the code to remove the forbidden items. In most cases, CKEditor removes just the forbidden code, with no impact on the content that is contained within the code.
    IMPORTANT: Please be aware that it is not always possible to remove forbidden code without also removing the content. In some cases, CKEditor removes the forbidden code and the content that is contained within the code.

  2. After the forbidden code is removed, click Apply again.

The code is rendered on the main edit screen.

Further recommendations

The following articles might be helpful:

Pangea CMS Guide