Hi,
I am using Drupal 7 and CKEditor(Newest). I would like to customize, so that depending on condition( node type in Drupal) different CSS/JS is loaded. What is the best aproach? Any documenation? ..anything would work. Thank you
Hi,
I am using Drupal 7 and CKEditor(Newest). I would like to customize, so that depending on condition( node type in Drupal) different CSS/JS is loaded. What is the best aproach? Any documenation? ..anything would work. Thank you
Got CSS but not JS
I got the styles loading but not JS is not exactly working. This is so far:
<script> var path = document.location.origin; CKEDITOR.scriptLoader.load(path + '/sites/all/themes/calendar.js'); CKEDITOR.on( 'instanceReady', function( ev ) { editor = ev.editor; editor.document.appendStyleSheet('/sites/all/style1.css'); editor.document.appendStyleSheet('/sites/all/stayle2.css'); var head = editor.document.getHead(); var body = editor.document.getBody(); var s32 = editor.document.$.createElement('script'); s32.onload = function(){Calendar.init();}; body.$.appendChild(s32); }); </script>The Calendar.init is not called. What is the best way to initiate the JS for the particular CKEditor instance? I believe the JS files are loading. Any help or comment would help. Thank you