1

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
  • 3
    I have a similar issue with editor-destroy-iframe, where in your code did you put that snippet to destroy the editor? I tried to put in ngOnDestroy but it's not working. Commented Apr 10, 2017 at 14:02

1 Answer 1

2

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;
Sign up to request clarification or add additional context in comments.

1 Comment

What does this have to do with the reported problem?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.