Ckeditor: Uncaught TypeError: Cannot read property 'keyCode' of undefined 解决方法
2014-05-08 18:10
886 查看
网站后台的编辑器使用的是ckeditor for java,版本号为3.3.2。先前运行很正常,没有出现问题,但是今天突然发现,当使用chrome插入图片时,选择完图片,点击确定按钮时,会报:
Uncaught TypeError: Cannot call method 'moveToPosition' of undefined
的错误,而使用ie就没有问题。在网上查了半天也没有找到解决方法,索性就想将ckeditor升级。在官网上下载了最新版本的ckeditor for java,版本号为3.6.4,将相应的文件替换之后,选择完图片却发现又报了:
Uncaught TypeError: Cannot read property 'keyCode' of undefined
的错误,在网上找了半天,终于找到了解决方案:在图片选择的网页中,通过js调用了:
方法,而问题的就出在那个1上,在3.5之前的版本,我们传入1没有问题,但是3.6之后进行了更改,我们将上面的那句话改为:
就可以正常插入图片了。
Uncaught TypeError: Cannot call method 'moveToPosition' of undefined
的错误,而使用ie就没有问题。在网上查了半天也没有找到解决方法,索性就想将ckeditor升级。在官网上下载了最新版本的ckeditor for java,版本号为3.6.4,将相应的文件替换之后,选择完图片却发现又报了:
Uncaught TypeError: Cannot read property 'keyCode' of undefined
的错误,在网上找了半天,终于找到了解决方案:在图片选择的网页中,通过js调用了:
window.top.opener.CKEDITOR.tools.callFunction(1,document.getElementById("f_url").value);
方法,而问题的就出在那个1上,在3.5之前的版本,我们传入1没有问题,但是3.6之后进行了更改,我们将上面的那句话改为:
window.top.opener.CKEDITOR.tools.callFunction(2,document.getElementById("f_url").value);
就可以正常插入图片了。
相关文章推荐
- echarts.min.js:25 Uncaught TypeError: Cannot read property 'features' of undefined 报错解决方法
- Uncaught TypeError: Cannot read property 'drawImage' of undefined错误的解决办法
- 【StackFlow】Uncaught TypeError: Cannot read property 'pageCount' of undefined
- Uncaught TypeError: Cannot read property 'call' of undefined jquery.validate.min.js:28
- easyui使用时出现这个Uncaught TypeError: Cannot read property 'combo' of undefined
- dataTabel Uncaught TypeError: Cannot read property 'asSorting' of undefined
- Uncaught TypeError: Cannot read property 'options' of undefined 错误
- Uncaught TypeError: Cannot read property 'plugin' of undefined
- Uncaught TypeError: Cannot read property 'call' of undefined jquery.validate.min.js:28
- echarts-all.js:1 Uncaught TypeError: Cannot read property 'getAttribute' of null
- TypeError: Cannot read property 'parentNode' of undefined
- TypeError: Cannot read property 'style' of null 错误解决
- Uncaught TypeError: Cannot read property 'length' of null
- Uncaught TypeError: Cannot read property 'length' of null
- 【ExtJS】Uncaught TypeError: Cannot read property 'length' of null
- TypeError: Cannot read property 'style' of null 错误解决
- uncaught typeerror cannot read property 'data' of undefined 报错原因
- Uncaught TypeError: Cannot call method 'replace' of undefined 的解决
- openlayers Uncaught TypeError: Cannot read property 'wrapDateLine' of null
- Uncaught TypeError: Cannot call method 'substring' of undefined