0

I would like to find out the best way to load custom CSS/JS for each textarea with CKEditor. For me, each Content Type has different CSS/JS and I would like to load them with the CKEditor on that particular page.

How do I hook into the CKEditor module to do just that?

P.S CKEditor is an independent module and not part of WYSIWYG Drupal Setup.

0

use hook_page_build to add or remove css or js files to the page based on the url. See the examples module for developers on how to add/remove js or css and to examples of render arrays.

your question is not so much about the CKeditor module or WYSIWYG module -- just how to customize css and js on specific criteria such as the page url.

2
  • Thank you tenken. The CSS/JS added to the Content Page do not apply to the content of textarea of CKEditor..How to apply the same CSS/JS of the page to the content of the textarea? Thanks for help
    – latvian
    Sep 24 '14 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.