Hi,
I try to get rid of ALL ckeditor's filters (stripping empty tags, adding empty elements, removing forbidden elements etc.)

I have read that this code can make it happen config.allowedContent = true;
In advanced options I tested putting some code into custom javascript config window config.fontSize_sizes = 'xx/16px;24/24px;48/48px;';
this works ok, however the first code does not seem to do any difference. (code is stripped in ckeditor when editing a node)

On ckeditor settings page I use cdn. I use the latest ckeditor.

Any ideas? There is tons of advices on how to customize ckeditor's filters all over the web - some of them work, some not, some only for the first time. It is very confusing.

For example this html code

<div class="a2a_kit a2a_default_style">
    <a class="a2a_button_facebook_like"></a>
</div>

completely dissapears when entering in source mode and returning to editor mode.

Can anybody help? Thank you.

Comments

loparr created an issue. See original summary.

loparr’s picture

Issue summary: View changes
loparr’s picture

Just tested ckeditor on simplytest.me and config.allowedContent = true; does not make any difference. Any ideas? This stripping "feature" is really annoying.

gifad’s picture

First, the issue is about the CKEditor javascript library, not the Drupal CKEditor module;
Second, you have to be polite with CKEditor :

<div class="a2a_kit a2a_default_style">
    <a class="a2a_button_facebook_like"><!-- ckeditor please do not remove --></a>
</div>

You may actually supply any comment, as long as it's not empty !

loparr’s picture

Thank you, this works. What about this code? Ckeditor alters data-href.

<div class="a2a_kit">
    <a class="a2a_button_facebook_like" data-action="recommend" data-href="http://example.com/" data-layout="box_count" data-width="55"></a>
</div>

Thank you again.