You may face an issue related to the DNN HTML editor, such as the layout breaking after saving the changes. It may be due to the HTML elements being updated automatically, or because of the default behavior of the CKEditor, which wraps the content in
</p> tags. This article provides the steps to handle such issues.
Go to Settings.
Click Site Settings.
Click Site Behavior.
Open the HTML Editor Manager.
Click Editor Config.
Uncheck AutoParagraph and AutoUpdateElement.
If the above solution does not work and you are using list elements in your HTML code, this may be the default behavior of the CKEditor as it handles the paragraph and list elements as separate blocks. Therefore, it ends up moving the
<p> elements outside of the
<ul> tags to prevent nested blocks before saving the content.
- It is recommended to refactor the code in order to use
<li>tags instead of
<p>tags for content inside the list.
- Alternatively, the code with the nested blocks is saved without any issues when using the basic editor instead of the Advanced one (CKE).
Follow the steps below to access the basic editor:
Go to a page and into Edit () mode.
Click on an HTML module and click the <> button.
Content entered into the HTML editor will no longer be wrapped in