CKEDITOR Error code: editor-destroy-iframe in Angular 2

匿名 (未验证) 提交于 2019-12-03 02:03:01

问题:

I am using ng2-ckeditor in my Angular2 project. It is working fine but when I go on another component, It shows warning message [CKEDITOR] Error code: editor-destroy-iframe.

I google for solution and found below solution:

for (name in CKEDITOR.instances) {         CKEDITOR.instances[name].destroy(true);     } 

But from where to get CKEDITOR. In ng2-ckeditor package, I can see only 2 library CKEditorModule, CKEditorComponent.

Please help me to solve this.

回答1:

Try adding the typescript definition file for CKEditor in package.json under devDependencies ("@types/ckeditor": "^0.0.34"):

"devDependencies": {     "@angular/compiler-cli": "~2.4.0",     "@angular/platform-server": "~2.4.0",     "@types/ckeditor": "^0.0.34" } 

Then run npm update to download the types. An alternate solution is to declare CKEditor in your file:

declare const CKEDITOR: any; 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!