I have written a plugin: a richcombo that drops-down a list of employees, and clicking on a name inserts a link to that employee's staff page. Works fine, but clicking on a name changes the control's label to the name that was clicked. I would like to change this behavior so that the label does not change.
I can do this by editing the source for richcombo and commenting out most of the setValue method, specifically lines 296-306. This of course changes the behavior for ALL richcombo controls, and will break if/when I apply an update.
I tried this code in the plugin's init:
which causes an error when richcombo tries to use setValue internally.
So, any suggestions to get the behavior I want?
I can do this by editing the source for richcombo and commenting out most of the setValue method, specifically lines 296-306. This of course changes the behavior for ALL richcombo controls, and will break if/when I apply an update.
I tried this code in the plugin's init:
editor.ui.addRichCombo('StaffLink',
{
init : function () {
// various setup
this.setValue = CKEDITOR.tools.override(this.setValue, function(value, text) {
this.value = '';
})
}which causes an error when richcombo tries to use setValue internally.
So, any suggestions to get the behavior I want?
