简体   繁体   English

ckEditor - 在 setData 后不触发 mouseup 事件

[英]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).我有一个通过 Javascript 加载的 ckEditor,然后在instanceReady事件上,我为mouseup添加了另一个事件......直到我使用setText属性(我同时使用了 jQuery 方式和 Javascript 方式)之前,这很好用。 After that is set, the mouseup event no longer triggers.设置后, mouseup事件不再触发。 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.这是 jQuery 插件版本,但它与内部 Javascript ckeditor 对象映射的工作方式相同。 (Rather it doesn't work). (相反它不起作用)。

Does setData or setText clear all event handlers? setDatasetText是否清除所有事件处理程序?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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