Issue with TinyMCE Automatically Formatting Rich Text
Description
I am using TinyMCE Rich Text Editor (tinymcerte-2.1.0-pl
) in MODX 3.1.1. When editing a custom template variable (TV) with TinyMCE, I noticed that it automatically wraps <li>
tags inside <ul>
, even when I intend to use standalone <li>
elements. This unexpected formatting causes display issues on my webpage.
What I Tried
-
Setting
valid_children
in TinyMCE Configuration- I created a system setting:
- Key:
tinymcerte.valid_children
- Value:
+body[li]
- Key:
- However, this did not prevent TinyMCE from wrapping
<li>
inside<ul>
.
- I created a system setting:
-
Checking
tinymcerte.toolbar1
andtinymcerte.valid_elements
- I tried adding
li
tovalid_elements
, but it did not change the behavior.
- I tried adding
-
Modifying
tinymcerte.content_css
- I checked if content styles influenced this behavior but found no effect.
Expected Behavior
I would like to enter raw HTML content in the TinyMCE editor and have it remain unchanged, particularly for <li>
tags.
Question
- How can I configure TinyMCE in MODX to allow standalone
<li>
elements without automatically wrapping them inside<ul>
? - Are there other settings I need to adjust to prevent TinyMCE from altering my HTML structure?
Any help would be greatly appreciated!