I've installed CKEditor in the backend of my website. I've got the following problem when switching from code view to wysiwyg view. The code I'm inserting is like:
<div class="span4">
<p>Some text here</p>
</div>
When I switch back to view mode CKEditor automatically removes the div surrounding the paragraph.
Can anyone please help me to remove this problem? I don't mind staying in code view but I do like working in the view mode for writing longer text.
Thanks in advance.
var editor1=CKEDITOR.replace('editor1');
editor1.config.allowedContent = true;
Like AlfonsoMl said, this has something to do with the Advanced Content Filter
For all support about this look here: http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter
or put the following line in your config to disable the content filter. (It's better to configure it)
CKEDITOR.config.allowedContent = true;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With