I see this question asked and answered for FCK editor but the solution does not seem to apply to CKeditor , or at least for version 4.4.4.
So my question is, how can I enable a custom button/plugin when text is selected.
Basically when you select text in the editor it will enable certain button like "copy" and "cut" etc etc. So I want to make a custom button enabled when I select text in the same way these get enabled.
Only one thing is I do not want to modify the source code so that when I upgrade CKedtor I will not have to lose this ability.

Any progress here?
I see this question asked back at 4.1 and still no answer seems to be found at 4.5, Anyone have any luck with this?
I asked one of the CKSource
I asked one of the CKSource devs and he had this to say:
"CommandDefinition.refresh handles that. Since all buttons are connected to editor commands, they respond to commandDefinition.refresh, which sets command state.
http://docs.ckeditor.com/#!/api/CKEDITOR.commandDefinition-method-refresh
See this blockquote example. cmdDef.refresh is executed every time selection is changed in the editor. It passes path in the argument. All you got to do is to check whether path meets desired contition and set command state accordingly.
Note that path (http://docs.ckeditor.com/#!/api/CKEDITOR.dom.elementPath) starts either at the position of the caret or BEGINNING of the selection."
You know, CKSource is a great option to get answers to such questions. If you get the Basic license you receive one year of tech support.
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!