I’m interested in creating a plugin that does this simple task:
Steps
1. User selects some text by highlighting
2. user clicks the plug-in
3. CKEDITOR, wraps the selected text with a tag with some class and/or ID.
Can anyone help with this? I’ve been playing with CKEDITOR.htmlWriter but haven’t even been able to get that started: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.htmlWriter.html#constructor
Thanks!
Look at the basicstyles plugin, you just need to define a button that applies a “style”, and you define what’s the element, attributes and styles that this “style” means.