Hi all,
I am using the stylesheetparser plugin to parse CSS rules defined in a different stylesheet (e.g. editor.css).
CKEditor 4 provides inline editing, what I really like. However, there is no DOM document anymore inside the editor, the original element (e.g. a div) is used as parent element for the editing area. The problem: the stylesheetparser plugin now parses all stylesheets currently loaded in the page.
So, my question is simple. Is there any way to define what stylesheets need to be parsed by the stylesheetparser plugin?
Example of the problem:
Example HTML:
I am using the stylesheetparser plugin to parse CSS rules defined in a different stylesheet (e.g. editor.css).
CKEditor 4 provides inline editing, what I really like. However, there is no DOM document anymore inside the editor, the original element (e.g. a div) is used as parent element for the editing area. The problem: the stylesheetparser plugin now parses all stylesheets currently loaded in the page.
So, my question is simple. Is there any way to define what stylesheets need to be parsed by the stylesheetparser plugin?
Example of the problem:
CKEDITOR.editorConfig = function(config) { config.extraPlugins = 'stylesheetparser'; // load the plugin config.stylesSet = []; // remove default styles config.contentsCss = '/css/editor.css'; // makes no sense, because it is not appended to the editor while using inline mode }
Example HTML:
<html> <head> <!-- contains CSS for the whole website and is, sadly enough, parsed by the plugin instead of editor.css --> <link type="text/css" rel="stylesheet" href="css/style.css" /> </head> <body> <div contenteditable="true"> <h1>Hi I am editable!</h1> <p>Lorem ipsum dolor sit amet, etc.</p> </div> </body> </html>