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
Post a Comment