Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Classes added in source view stripped on save

Status Resolved
Add-on / Version
Severity Critical
EE Version

Jean St-Amand

May 01, 2013

Hi there - I updated to the latest version of Wyvern to take advantage of the new interface and some of the other nice features added - one thing I’ve encountered in having done that though is that previously, if I used the source button to expose the HTML, I could add things like DIVS and add classes to them and they would be retained.  But I find with the new version, I can add a DIV but if i add a class to it, it gets stripped out. The CKEditor forums and blog mention this as an issue with the Advanced Content Filter with CKEditor - and if not integrated or configured, CKEditor by default strips out anything not specifically “allowed” in the integration.  Is this a configurable option in the config file for Wyvern? I went through it and didn’t spot it.

#1

BoldMinded (Brian)

I wasn’t aware of any Advanced Content Filtering option. In my dev sandbox it lets me add divs with classes and they remain intact when toggling between source and wysiwyg mode, and also after saving and reloading the entry. https://www.evernote.com/shard/s9/sh/91d9a707-701a-41ba-8af8-203634ce5092/f9ecde983eede2aa7b9cbe520c28b515

What version of CKEditor do you have?

#2

Jean St-Amand

1.5.3. Yeah that’s what’s wierd. It worked previously, but now that I’ve updated, it gets stripped out. I can start with:

<div class="foo">whatever</div>

But when I click source again to go back to WYSIWYG mode (or just save from there) what is then saved is:

<div>whatever</div>
#3

Jean St-Amand

I found this forum post about something similar on the ckeditor site: http://ckeditor.com/forums/Support/Classes-being-stripped

#4

Jean St-Amand

Oh sorry you asked about the version of ckeditor - 4.1 (I updated last week prior to 4.1.1 coming out)

#5

BoldMinded (Brian)

Fixed in 1.5.9, see this thread for reference: http://boldminded.com/support/ticket/451

#6

BoldMinded (Brian)

Make sure you clear your browser cache as its a JS file change, some browsers seem to cache them pretty hard.

Login to reply