The CMS i'm using has CKEditor 4.5.10 and the stylesheetparser plugin enabled. Recently the CMS switched to a bootstrap layout in the backend. Now the styles dropdown is filled with bootstrap classes that I don't need.
The text is only used in the frontend part of the website. I only want to parse my frontend screen.css file in the Styles dropdown. I push the stylesheet to the config.contentsCss
array, so stylesheetparser can parse the classnames. However, all the loaded css of the current Backend page is also loaded (Bootstrap, ...).
This block of code parses all the loaded css in the current document: https://github.com/ckeditor/ckeditor-dev/blob/master/plugins/stylesheetparser/plugin.js#L44-L86
As a CMS user I only want the limited list of CSS selectors in the Styles dropdown. It should ignore parsing the stylesheets of the current document, and only parse my .css file I used in contentsCss. Is something like that possible? How can I disallow the document stylesheets in the stylesheetparser plugin?
Figured out the issue. We used this plugin: http://ckeditor.com/addon/divarea
This plugin will remove the iframe and insert ckeditor as a DIV into your webpage. The stylesheetparser plugin will then check all your document stylesheets and parse them into the Styles dropdown. Because I use a lot of bootstrap in my backend page, the styles dropdown is filled with bootstrap classes. Removing the divarea plugin causes ckeditor to be an iframe (default behaviour) and thus, only the stylesheets that I pushed to the
contentsCss
array are loaded into the iframe document and the styles dropdown.