ckeditor - onpaste事件 [英] ckeditor - onpaste event
本文介绍了ckeditor - onpaste事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有谁知道我如何在CKEditor 3.x中附加 onpaste
事件?
Does anyone know how I can attach an onpaste
event in CKEditor 3.x?
抓取 CTRL + V 数据并向其中添加几个文本,然后将其添加到编辑器。
I basically want to grab CTRL + V data and add few text to it and then add it to the editor.
看着周围,但还没有找到一个确定的答案。
I have looked around but have not found a definitive answer. CKEditor forum is of not much help.
推荐答案
这应该做的
var editor = CKEDITOR.instances.YourInputControlName;
editor.on('paste', function(evt) {
// Update the text
evt.editor.setData(evt.editor.getData() + ' your additional comments.');
}, editor.element.$);
这篇关于ckeditor - onpaste事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文