Reputation: 11
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?
Upvotes: 1
Views: 1842