Opened 13 years ago

Closed 12 years ago

#8264 closed Bug (expired)

Inserting HTML into CKEditor causes NS_ERROR_FAILURE

Reported by: eliotsykes Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Firefox Cc:


Using CKEditor 3.6.1 in Firefox 5.0 on Ubuntu, I get this error when I try to drag and drop some HTML into CKEditor (WYSIWYG mode) (I'm using prototypejs to handle the dragging and dropping):

uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMNSHTMLDocument.execCommand]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: http://myhost/ckeditor/ckeditor.js :: q :: line 8765"  data: no]

I also ran this with CKeditor's unminified source and the problem occurs at line 125 of plugins/wysiwygarea/plugin.js:

this.document.$.execCommand( 'inserthtml', false, data );

After the error occurs once, everything works fine. I can drag and drop images and they all work without any errors.

I'm not sure of the exact reason for this error, I couldn't put together a test case to add to this issue unfortunately, however I wanted to report it in case others encounter this error and can provide more details or if they just want to know a workaround.

This error is similar to the error reported here, so that's how the workaround below was found:

Add this JavaScript to fix the issue

CKEDITOR.on('instanceReady', function(e) {
	var editorInstance = e.editor;

    // Refresh 'contentEditable'
    var body = editorInstance.document.getBody();
    body.setAttribute( 'contentEditable', false );
    body.setAttribute( 'contentEditable', true );

The bug also happens with the nightly build (Revision number: 7199) taken on August 15th 2011.

Change History (4)

comment:1 Changed 13 years ago by Jakub Ś

Keywords: Firefox added; firefox contentEditable removed
Status: newpending

Could you try one more time and provide this TC file?

You may have found a bug in CKEditor that we wish to check but it is impossible without having anything to grab on. What is more prototype is a very popular library which many users are integrating with CKEdititor. That is why we don't like when these two are not getting along with each other.

Waiting for your comments

comment:2 Changed 12 years ago by Jakub Ś

Version: 3.6.1

comment:3 Changed 12 years ago by Jakub Ś

@eliotsykes any updtaes regarding this issue?

comment:4 Changed 12 years ago by Jakub Ś

Resolution: expired
Status: pendingclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy