Accessibility links

Breaking News

Validating code in Source Code View

update

NOTE: This article contains information about inserting HTML / CSS code into CKEditor using Source Code View. For general information about CKEditor, see the alternative article below:

What's inside this article:



About Source Code View

Source Code View lets you create and edit text content using HTML / CSS code. It is available for creating the following items:

Source Code View supports HTML and CSS code. It is not possible to apply Javascript. Additionally, certain HTML / CSS elements are not supported or blocked for security reasons.




Open Source Code View

To open Source Code View, hit the Source Code View icon in CKEditor.




Apply HTML / CSS code

Enter the code in the HTML code box. You can type the code directly or use device controls to paste code from an external HTML editor:

  • Windows: On your keyboard, press the Ctrl and V keys simultaneously.
  • Mac: On your keyboard, press the ⌘ Command and V keys simultaneously.

Once you are satisfied, hit Apply.

CKEditor checks for unsupported or blocked code. If no issues are found, Source Code View closes and the code is rendered in CKEditor.

If unsupported code is found, you are normally not notified. The following actions might be applied:

  • If possible, unsupported code is transformed automatically into supported code that performs the same function. For example, the b (bold) element always transforms into the strong element.
  • If an equivalent supported element / attribute is not available, the unsupported code might be automatically removed.

If the code contains elements or attributes that are specifically blocked for security reasons, you see a validation error.




Manage validation errors

If the code contains items that are specifically blocked for security reasons, you see a validation error that lists the forbidden elements and attributes.

The following options are available:

  • Hit Clean up the code to let Pangea CMS automatically remove the blocked code. If possible, CKEditor removes only the blocked element / attribute without impacting the content contained within the code. If this is not possible, CKEditor might also remove the content contained within the code.
  • Manually replace or remove the blocked code. The validation error includes the name of the blocked element / attribute and the line of code where it is present. You can also use the Find and Replace by options to instantly update all instances of the blocked element / attribute with a new value.

After the blocked code is removed, hit Apply again. The code is rendered in CKEditor.




Further recommendations

The following articles might be helpful:

Pangea CMS Guide

Need help?

XS
SM
MD
LG