【发布时间】:2010-09-26 23:31:20
【问题描述】:
我正在构建一个应用程序,该应用程序需要用户将 html 元素拖放到 CKeditor 实例上。我需要监听 drop 事件,以便我可以采取措施删除被拖放到编辑器上的元素。我看到有一个“粘贴”事件,但它不是由 drop 触发的。
这是我的简单测试,使用 CKeditor jquery 适配器:
// set up instance
$('#editor1').ckeditor();
var editor = $('#editor1').ckeditorGet();
// this gets a list of all events that you can listen for
console.log(editor._.events);
// here's how you listen for an event
editor.on("someEvent", function(e) {
console.log(e);
});
我在文档中找不到任何可以说明这一点的内容。
有什么想法吗?
【问题讨论】:
-
你有什么运气吗?我现在正在尝试做同样的事情。
-
不,不走运。我走了一条不同的路。
标签: javascript drag-and-drop ckeditor