ckeditor模糊和对话

mcg*_*ilm 1 jquery blur ckeditor

我有一个模糊功能附加到我的ckeditor就像这样

editor = CKEDITOR.instances.fck;
editor.on("blur",function(e){
    alert("hello");
});
Run Code Online (Sandbox Code Playgroud)

你跟我 ?

现在,当我点击flash按钮时,编辑器会模糊并导致警报显示.

如何阻止这种情况发生,并且仍然会在其他时间出现警报,例如当用户离开编辑器区域时

再次感谢

skr*_*ile 6

只要我们正在处理黑客攻击,这就是我喜欢用来解决这个问题的方法.关键是CKE使用iFrames进行下拉式控件(颜色选择器和背景颜色,字体大小,字体类型)

 editor.on("blur", function(e) {
  if ($(document.activeElement).get(0).tagName.toLowerCase() != "iframe") {
      // your code here for "real" blur event
  }
});
Run Code Online (Sandbox Code Playgroud)