AnApprentice
AnApprentice

Reputation: 110960

CKEditor PlugIn, Simple PlugIn Ability

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!

Upvotes: 1

Views: 582

Answers (1)

AlfonsoML
AlfonsoML

Reputation: 12690

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.

Upvotes: 1

Related Questions