Hi,
I'm far to be a javascript expert, but i like the tinymce feature that allow you to add css classes from an external file.
So, i've tried to make a similar plugin for ckeditor. This is not perfect, but it works
Only single defined class are loaded, like this:
.myRule { ... }
I still have some problems to get rules from dynamically loaded css file, so ATM, you'll need to link the file manually in your html page.
Any help/comments are welcome
https://github.com/ronan-gloo/Ckeditor-Rules-Importer
From read me:
Load plugin and set path to your css file in config.js:
CKEDITOR.editorConfig = function( config ) { config.extraPlugins = 'rulesimport'; config.rulesimport_filepath = 'http://example.com/ckstyles.css'; };
Add the plugin to your toolbar ("RulesImport")
Re: Plugin: add css classes from file
A similar plugin is available here: http://dev.ckeditor.com/ticket/901
This one requires a change to the styles combo and then the classes are available as other styles in the editor.