Email
Share

We Rock Your Web Forum » Content Management Systems » Drupal

CKeditor discarding CSS and JavaScript?

(2 posts)
  1. xman

    member
    Joined: Sep '09
    Posts: 13

    I can't seem to find out why, when I copy and paste content within the CKeditor (for example, from the body section to teaser in Drupal) that certain CSS and JavaScript gets left out. I have "security filters" in my CKeditor profile unchecked, but the CSS/JS is still getting removed.

    Any ideas?

    Posted 1 year ago #

  2. Posted 1 year ago
  3. Anonymous



    Add the following to the ckeditor.config.js file in your /modules/ckeditor directory:
    config.protectedSource.push( /<style.+>[\S\s]*<\/style>/gi );

    Posted 1 year ago #

RSS feed for this topic

Reply

(required)

Allowed markup: BBcode blockquote code em strong ul ol li font strike center u hr.
You can also put code in between backtick ( ` ) characters.