I’m trying to remove a stylesheet that is dynamically being added to the end of <head> tag
For some reasons, i’m forced to use javascript to remove that stylesheet tag and add my own
here is the code i tried –
jQuery(document).ready(function(){
jQuery('link[href^="somepath/editor.css"]').remove();
jQuery('head').append("<link href='somepath/custom/editor.css' type='text/css' rel='stylesheet' />");
});
the problem is that this function is being executed before the CkEditor functions. So my Stylesheet is being added before the ckeditor stylesheet and the ckeditor stylesheet
I tried using .load instead of .ready but then the code doesn’t seem to run at all.
Any help?
If you don’t know when the css will be added you can use setInterval to poll for it.