Opened 4 years ago

Last modified 4 years ago

#13117 confirmed Bug

Editor.document is not set in source mode

Reported by: giorgio Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: IBM Cc: IRINAURU@…, giorgio, satya_minnekanti@…, chrisgui@…

Description (last modified by Piotrek Koszuliński)

While using the CKEditor in source mode( in the config startupMode : "source" ) instantiating the CKEditor object, with the method replace, the object doesn't contain many basic attributes e.g. the document that contains the editor or the selection of the user (edit: selection is not accessible in source mode for a reason - see comment:1).

If we use instead the wysiwyg mode, everything works fine and we have those attributes.

Change History (4)

comment:1 Changed 4 years ago by Piotrek Koszuliński

Status: newpending
Version: 4.4.7

The editor.getSelection() method returns null in source mode and that's correct. This method and the whole selection system works only with contenteditable, not with textarea.

As for editor.document, it should point to the host page's document.

But before I'll confirm this ticket - are there any other properties that aren't set correctly?

comment:2 Changed 4 years ago by giorgio

We noticed that were missing just those two attributes, because we needed them.

And in our case the editor.document attribute is not present in the object.

So unfortunately i can't tell you if there are other attributes missing.

comment:3 Changed 4 years ago by Piotrek Koszuliński

Description: modified (diff)
Status: pendingconfirmed
Summary: In source mode the CKEditor object is not instantiated correctlyEditor.document is not set in source mode

comment:4 Changed 4 years ago by Jakub Ś

As discussed with @Reinmar the error is that editor.document is undefined in source mode and should be the same as CKEDITOR.document (should point to page document).

Note: See TracTickets for help on using tickets.
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy