jquery - Add css file dynamically to ckeditor javascript -


i trying add css file dynamically ckeditor. css file uploaded using uploader on same page editor , oncomplete want add css file ckeditor using below code,

function addtoeditor(editorname, fileurl) if(fileurl != '')     {         var randomnumber = math.random();          alert(_gwebdocroot + fileurl + '?v='+ randomnumber);          ckeditor.instances[editorname].config.contentscss = _gwebdocroot + fileurl + '?v='+ randomnumber;     } } 

but above code not work, please me solve issue. regards,

neha

var doc = ckeditor.instances.editor1.document.$; // shortcut $("<link/>", {    rel: "stylesheet",    type: "text/css",    href: "http://my.little.pony.net/your.css"   }).appendto($(doc).find("head")); 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -