views:

74

answers:

0

So I have a ckEditor loaded through javascript, then on the instanceReady event I add another event for mouseup... this works well and dandy until i use the setText property (I used both the jquery way and the javascript way). After that is set, the mouseup event no longer triggers. Not even after I set the event handler again.

Relevant code:

var elem = CKEDITOR.instances[eID];
elem.document.on("mouseup",function(){
            QuickHandler(elem);
        });



function QuickHandler(who)
{

    $("#"+who.name).val(who.getData() +    QuickTextSelected.QuickTextData);
       $("input[type='text'],textarea, .cke_contents").css({border: "Solid 1px rgb(155,181,234)"}).unbind("click");


}

This is the jquery plugin version, but it works the same way with the internal javascript ckeditor object map. (Rather it doesn't work).

Does setData or setText clear all event handlers?

related questions