Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我查看了 CKEditor 5 文档,但仍然无法弄清楚如何在我的页面中单击任何气球编辑器区域时触发简单的 javascript alert('hello')。任何线索都非常感谢!
好的,所以答案实际上很简单,只需将点击事件绑定到元素,在这种情况下通过 CKEditor 类,使用 JQuery 如下:
$(document).on('click', '.ck-editor__editable_inline', function(e) { // do something })