jQuery技术:CKeditor上的Jquery事件

你好,在一个带有id为“ckeditor_input”的textarea的表单中

$("#ckeditor_input").ckeditor(); $("#ckeditor_input").html(); // can get the value ("#ckeditor_input").click/blur/keydown/keypressed( function(){ alert("OK"); } ); //doesn't work! 

问题是ckeditor! 如果我没有在textarea上启动ckeditor的实例,所有事件都可以正常工作! 在ckeditor实例上获取事件的正确方法是什么?

谢谢

    CKEditor使用iframe ……非常讨厌jQuery事件。 你可以尝试:

     $($('#parent-element>iframe').get(0).contentWindow.document).live('click',function() { ... }); 

    我没有测试过,所以不能完全确定它是否有效。 但我确信这是解决方案的起点。 让我知道它是怎么回事,如果它不起作用,我会尝试解决问题所在。

    编辑: :(根据评论)

     $(CKEDITOR.instances.desc_product).click(function() { ... }); 

    我认为应该这样做。 但只能在CKEditor正确加载后运行它。

      以上就是jQuery教程分享CKeditor上的Jquery事件相关内容,想了解更多jQuery开发(异常处理)及jQuery教程关注计算机技术网(www.ctvol.com)!)。

      本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

      ctvol管理联系方式QQ:251552304

      本文章地址:https://www.ctvol.com/jquerytutorial/524607.html

      (0)
      上一篇 2020年12月13日
      下一篇 2020年12月13日

      精彩推荐