0

I am having issues with drupal and ckeditor. I would like to saev following code:

<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>

However due to ckeditor's filters almost everything gets stripped. I tried various advices - turning off advanced content filter or adding config.allowedContent = true; inside custom javascript configuration window. Nothing what I tried works. Thank you for any advices.

1 Answer 1

1

go to:

/admin/config/content/ckeditor/edit/Advanced (for Filter HTML)

/admin/config/content/ckeditor/edit/Full (for Full HTML)

Then under Advanced Content Filter, select disabled.

enter image description here

If the above does not do it, depending on which one you are using (filter or full html) You need to go to

/admin/config/content/formats/filtered_html

OR

/admin/config/content/formats/full_html

enter image description here

try unchecking the correct faulty and chopped off html box.

4
  • Hi, while these advices might worked in previous versions of ckeditor module/ckeditor/ckeditor library, none of it works with recent ckeditor module 7.x.-1.16 - tested on simplytest.me
    – loparr
    Commented Sep 17, 2015 at 8:44
  • @loparr I use 7.x.-1.16
    – No Sssweat
    Commented Sep 17, 2015 at 9:34
  • I use ckeditor through CKeditor module, not through Wysiwyg which also allows you to use CKeditor. Not sure if this makes a difference.
    – No Sssweat
    Commented Sep 17, 2015 at 9:38
  • 1
    hi, I just tested it more and understand it little bit more. Turning off content filter in 7.x.-1.16 and most recent ckeditor library will do the trick with data-href as well, while previous versions of ckeditor library do not listen to turning off filter completely, resulting in splitting data-href into data-="" and href.
    – loparr
    Commented Sep 17, 2015 at 10:17

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.