Dev / Drupal

Allowing Code in CKEditor Wysiwyg

Every used CKEditor’s WYSIWYG, inserted some code in Source view, then when you reverted to WYSIWYG the code disappeared?

The default setting of CKEditor strips the html, and extra bits of code that aren’t entered normally bu users. This is normal of course. It’s just cleaning up code the way it’s supposed to.

But there may be times when you need to enter code, like embed code or add some classes. Here’s how to do it:

admin/config/content/ckeditor/edit/Full
->
ADVANCED OPTIONS
->
Custom JavaScript configuration
->
Paste in:
config.allowedContent = true;

SAVE

Source: https://www.drupal.org/node/1950498#comment-7706699

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s