Hello everybody.
I wrote a plugin for the CKEditor - it's a select box which is initialized like this:
onClick I now need the selected value AND the selected text (alternatively html or even the selected index would work, too).
Right now my onClick function looks like this:
Is there a way to get the html, the text, or the index of the currently selected value?
Thanks a lot in advance.
I wrote a plugin for the CKEditor - it's a select box which is initialized like this:
init : function(){
this.startGroup( 'myplugin' );
for ( i = 0 ; i < myarray.length ; i++ ){
// value, html, text
this.add( "{{"+myarray[i][1]+"}}", '<span>' + myarray[i][0] + '</span>', myarray[i][0] );
}
}as you see the value differs from the html and text. (this.add inserts the value, the html and the text)onClick I now need the selected value AND the selected text (alternatively html or even the selected index would work, too).
Right now my onClick function looks like this:
onClick : function( value ){
alert(value);
}So I only know the current value which is in my case "{{"+myarray[i][1]+"}}". Is there a way to get the html, the text, or the index of the currently selected value?
Thanks a lot in advance.
