Skip to content

[CKEDITOR] Error code: editor-destroy-iframe #24

@yabab-dev

Description

@yabab-dev
Owner
No description provided.

Activity

yabab-dev

yabab-dev commented on Aug 2, 2016

@yabab-dev
OwnerAuthor

Same as #23 need to use divarea plugin or inline mode

pain0486

pain0486 commented on Feb 15, 2017

@pain0486

I added the extraPlugins: 'divarea' and got the following:
Failed to load resource: the server responded with a status of 404 (Not Found) http://cdn.ckeditor.com/4.5.11/full/plugins/divarea/plugin.js/.

niravpatel9898

niravpatel9898 commented on Feb 16, 2017

@niravpatel9898

same here @pain0486

yabab-dev

yabab-dev commented on Feb 16, 2017

@yabab-dev
OwnerAuthor
pain0486

pain0486 commented on Feb 16, 2017

@pain0486

Worked perfectly thanks @CHYMZ !

niravpatel9898

niravpatel9898 commented on Feb 17, 2017

@niravpatel9898

Sorted !! thank you very much @CHYMZ

OdaiTu

OdaiTu commented on Mar 4, 2017

@OdaiTu

i just did the same thing and i got this error

Uncaught ReferenceError: CKEDITOR is not defined
at plugin.js:5

AlexandrZl

AlexandrZl commented on Mar 16, 2017

@AlexandrZl

The above way doesn't work

7 remaining items

saostad

saostad commented on Jul 31, 2017

@saostad

Solution is :
in component:

   <ckeditor
        [config]="{extraPlugins: 'divarea'}"
        [(ngModel)]="selectedCategory.short_desc"
        debounce="500"
         name="short_desc">
    </ckeditor> 

and in index.html as reference:

<script src="https://cdn.ckeditor.com/4.7.0/full-all/ckeditor.js"></script>

rmcsharry

rmcsharry commented on Oct 13, 2017

@rmcsharry

The problem with using 'divarea' is that now your editor is a div in the page itself and therefore will use the styles from your website. If, for example, you want the font-style dropdown in the editor toolbar and your website does not load those fonts, those dropdowns will not work properly when changing font-size and font-style.

The 'divarea' plugin basically replaces the hidden textarea with a div. So if you want full support in the editor you need to work out how to properly destroy the editor before leaving the current page that the iFrame is on.

gianny82

gianny82 commented on Oct 30, 2017

@gianny82

Hi all, I don't have the problem if from the CKEditorComponent father component I write the following code lines before to leave the page(note: _ckEditorIstance is the instance variable of the CKEditorComponent):

`if (this._ckEditorIstance) {

      this._log.debug('destroing ckeditor..');
      
      this._ckEditorIstance.removeAllListeners();
      this._ckEditorIstance.destroy();
      this._ckEditorIstance = null;
  }`

I noticed that in ckeditor.component.ts there is a setTimeout that call the same code linesbut maybe the problem is that after the blink of the setTimeout the dom has already gone.

@CHYMZ : there is anyway a problem calling directly the destroy whitout setTimeout if the editor has the focus(I think that is the reason of the setTimeout). The problem goes away if I add the line:

this._ckEditorIstance.focusManager.blur(true);

There is no way to destroy correctly whitout setTimeout and whitout hacks?

yangfan0095

yangfan0095 commented on Dec 5, 2017

@yangfan0095

http://docs.ckeditor.com/#!/guide/dev_errors-section-editor-destroy-iframe

editor-destroy-iframe

Location: plugins/wysiwygarea/plugin.js
Description: The editor's <iframe> could not be destroyed correctly because it had been unloaded before the editor was destroyed. Make sure to destroy the editor before detaching it from the DOM.
Additional data: None.

ehsaanwelcome

ehsaanwelcome commented on Dec 13, 2017

@ehsaanwelcome

I think, issue is with settimeout in ngOnDestroy.
editor is removed first from the dom and then timeout fire
i test it without timeout and no warning.

but for this, i had to recompile the code

kjhatis

kjhatis commented on Dec 13, 2017

@kjhatis

@ehsaanwelcome Dont know why you are thinking! the ticket is already closed.

asterieks

asterieks commented on Dec 30, 2017

@asterieks

Hi all.
I dont understand how may I import an instance and close iframe.
From my point of view its impossible to call cKEditorComponentngInstance.OnDestroy() from my app.ts.
May u help me with that?

AlanObject

AlanObject commented on Jan 30, 2018

@AlanObject

I am running into this issue and as far as I can tell from this thread the issue is still open and there is no stable work-around. If that is not true can someone post a link to a good work around?

The method of destroying all instances (loop on CKEDITOR.instances) won't work for me because I have multiple Angular components on the screen each with their own instance.

thedailycommute

thedailycommute commented on Apr 20, 2018

@thedailycommute

Just in case anyone else comes looking for a solution here (and no, there isn't a solution that still allows us to use CKEDITOR without the 'divarea' plugin), this link helps explain the problem, and the fact that it has to do with the way Angular is implemented (including the latest versions): https://github.com/angular/angular/issues/14252

AlanObject

AlanObject commented on Jul 23, 2018

@AlanObject

thedailycommute -- your link goes 404. Can you repost?

thedailycommute

thedailycommute commented on Jul 24, 2018

@thedailycommute

It looks like all issues were relocated. As far as I can remember, this is the issue I originally linked to:

#212

khanh19934

khanh19934 commented on Sep 11, 2018

@khanh19934

if we use more than one plugins it show 404 not found ...

Marshal27

Marshal27 commented on Oct 5, 2018

@Marshal27

Please see this SO post. A work around on destroying iFrame in Angular6 with modification to library file to eliminate error thrown by CKEditorComponent.prototype.ngOnDestroy in ckeditor.component.js.

https://stackoverflow.com/questions/48525867/angular-ng-ckeditor-and-the-editor-destroy-iframe-bug/52655850#52655850

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @AshMcConnell@rmcsharry@yabab-dev@ehsaanwelcome@AlexandrZl

        Issue actions

          [CKEDITOR] Error code: editor-destroy-iframe · Issue #24 · yabab-dev/ng2-ckeditor