简体   繁体   中英

ckEditor - mouseup event not firing after setData

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?

似乎通过使用 setData CKEditor 实际上替换了使事件无效的文档元素,请参阅#6633

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM