CKEDITOR,如何为CKEditor TextArea编写onclick事件和onkeyup事件。 [英] CKEDITOR,How to write onclick event and onkeyup events for CKEditor TextArea.
问题描述
正在使用CKEDITOR创建Web应用程序。
现在当我点击CKEDITOR Textarea时,我想要一个弹出窗口。
我试过两种方式
1.
Hi,
am creating web application for that am using CKEDITOR.
Now when I click on the CKEDITOR Textarea I want to rise a popup window.
I tried in two ways
1.
<script type="text/javascript">
var myEl = document.getElementById('txt_pr_desc21');
myEl.addEventListener('onclick', function() {
$ProductProfile.dialog('open');
});
</script>
onclick工作正常。
2.
onclick is working.
2.
<script type="text/javascript">
CKEDITOR.instances['txt_pr_desc21'].on('contentDom', function() {
this.document.on('onclick', function(event) {
$ProductProfile.dialog('open');
alert('ok');
});
});
</script>
给出错误
Microsoft JScript运行时错误:无法使用获取属性'on'的值:对象为null或未定义。
请建议我,提前致谢。
It is giving error
Microsoft JScript runtime error: Unable to get value of the property 'on': object is null or undefined.
please suggest me, Thanks in advance.
推荐答案
ProductProfile.dialog(' open');
});
< / script>
ProductProfile.dialog('open'); }); </script>
onclick工作正常。
2.
onclick is working.
2.
<script type="text/javascript">
CKEDITOR.instances['txt_pr_desc21'].on('contentDom', function() {
this.document.on('onclick', function(event) {
ProductProfile.dialog(' open');
alert(' ok');
});
});
< / script>
ProductProfile.dialog('open'); alert('ok'); }); }); </script>
给出错误
Microsoft JScript运行时错误:无法使用获取属性'on'的值:object为null或undefined。
请建议我,提前致谢。
It is giving error
Microsoft JScript runtime error: Unable to get value of the property 'on': object is null or undefined.
please suggest me, Thanks in advance.
这篇关于CKEDITOR,如何为CKEditor TextArea编写onclick事件和onkeyup事件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!