Using Drupal 7.21 with ckeditor wrapper 1.12 and ckeditor 4.1 from their website. When I paste or type in code such as v-aligns for tables or inline styles and save things are fine, but as soon as I edit a page all this is stripped out.

If I got to Configuration -> ckeditor -> edit global - everything is default

If I go to Full / Full HTML -> edit or Advanced / Filtered HTML -> edit everything is on default as well. I see no security options I could select other than disabling "Always run security filters for CKEditor." which doesn't seem to make any difference.

If I go to Configuration -> Text Inputs -> and edit any of the ones I've created "Limit allowed HTML tags" is not selected on any of the options.

Also the toolbar occasionally doesn't show up at all.

Comments

nick.morahan’s picture

Noticed this after updating CK Editor.

Geijutsuka’s picture

As soon as I updated to the newest full CKEditor library (4.1), all my classes, inline styles, etc. are getting stripped, even with the Full HTML text format.

Correction: it's not taking classes and styles off of everything oddly enough, my div elements keep their classes and styles.

Geijutsuka’s picture

wwalc’s picture

If the problem started happening when you updated CKEditor library to 4.1 then in the "Advanced options" section of CKEditor profile add this:
config.allowedContent = true;

Read Upgrading to CKEditor 4.1 for more details.

We'll deal with this in CKEditor module somehow as well- see #1950498: JavaScript and other tags are being removed after updating to CKEditor 4.1.

Wiktor Walc
http://ckeditor.com
"Support Open Source Software"

nick.morahan’s picture

That sorted it for me

mhurston’s picture

THANK YOU! This fixed my issue!

avantwaves’s picture

That fixed for me! Thanks

new123456789’s picture

Thank you. This improved the outcome of my ckeditor but didn't fix it 100%.

At the moment, when I paste the following:

<ul class="social-bookmarks"><li class="label">Connect with us:</li>
<li class="twitter"><a href="http://twitter.com/morethanthemes"></a></li>
<li class="facebook"><a href="http://www.facebook.com/pages/More-than-just-themes/194842423863081"></a></li>
<li class="linkedin"><a href="#"></a></li>
<li class="delicious"><a href="#"></a></li>
<li class="rss"><a href="rss.xml"></a></li>
</ul>

It strips it into the following:

<ul class="social-bookmarks">
	<li class="label">Connect with us:</li>
	<li class="twitter">&nbsp;</li>
	<li class="facebook">&nbsp;</li>
	<li class="linkedin">&nbsp;</li>
	<li class="delicious">&nbsp;</li>
	<li class="rss">&nbsp;</li>
</ul>

How do I make it NOT strip out the a tags?

wwalc’s picture

Check this comment: http://dev.ckeditor.com/ticket/10325#comment:2

In general you should separate "real" content (blog posts, articles) and HTML templates to avoid this kind of issues.

Wiktor Walc
http://ckeditor.com
"Support Open Source Software"

new123456789’s picture

Thank you!!!

meno1max’s picture

Hi;

the *advanced options* fix does not stop CKEditor 4.1.1 from messing up with Tables filter.
If I paste and save the
[table=tables-entry-list ! n............
........ | ............ | ................| .......... ]

pre-formatted text it works fine. But if I go back to edit, it comes up wrapped in <p></p> and all in one line.

Any idea?

Thanks

meno1max

gorod1277’s picture

wwalc, thank you very much. Works perfectly for Drupal 6 as well.

bryanmanalo’s picture

This worked for me.

John Carbone’s picture

ben833’s picture

This fixed the unwanted stripping out of HTML:
Go to /admin/config/content/ckeditor/edit/Full
Click the Advanced content filter link, which makes a form drop down.
Set Advanced content filter: Disabled