I am having issues with the text editor in EE deleting code that I add to pages. We are wanting to style our support pages a certain way, and I need to be able to add divs and classes to existing p, ul, li, and other tags.

For example:

I have this content on a page:

[p]Getting Started[/p]

[ul] [li]FAQ[/li] [li]Support Contacts[/li] [/ul]

if I wrap it in a div, like this:

[div class="support-content"]

[p]Getting Started[/p]

[ul] [li]FAQ[/li] [li]Support Contacts[/li] [/ul] [/div]

and save, it keeps the div I added, but when I go to edit the page again, it deletes the div.

Is there a way to prevent this from happening, or turn off the rich text editor for certain pages so I can just directly edit the source code?


  • Which rich text editor are you using - tinyMCE, or a Wygwam field (CKEditor)?
    – user800
    Commented Jul 29, 2014 at 20:31
  • We're using Wygwam (3.1.2).
    – Paul S.
    Commented Jul 31, 2014 at 11:33

1 Answer 1


You can configure Wygwam/CKeditor to ignore certain tags and classes/not strip them out.

I found something that may be similar over on Stackoverflow: CKEditor strips classes from divs. In your case, you're seeing Wygwam/CKEditor strip the whole div. Apparently, though, you can configure your instance of Wygwam fields to ignore certain types of code, and/or leave classes alone.

So I did a little more searching and found this on this subsite: Wygwam - stripping tags from ul li (class and id) [Advanced Content Filter (ACF)] that deals directly with configuring ckeditor in Wygwam. I think these two questions, and their answers, will be helpful to you.

  • Thanks, Leigh! I'll give this a shot and see how it works. Will reply here with the outcome either way.
    – Paul S.
    Commented Jul 31, 2014 at 20:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.