Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#4178 closed Bug (fixed)

FCK.GetRealElement fails after copy-and-paste on embedded flash

Reported by: Gergely Zayzon Owned by: Frederico Caldeira Knabben
Priority: Normal Milestone: CKEditor 3.0
Component: General Version: FCKeditor 2.6.4
Keywords: Confirmed Cc:


FCK.GetRealElement() fails to process the document, when the source of copying is an another FCKEditor instance, the text contains an embedded flash video with width and height defined, and you paste it into an another FCKEditor instance.

The A.getAttribute('_fckrealelement') returns a 0 value (that I believe is normal), but the FCKTempBin.Elements array probably has no corresponding item, therefore e becomes undefined, making the following e.width statement fail with a JavaScript error. The consequences are the following:

  • You can not view the source of the copied document;
  • You can proceed to saving the underlying form, but the initial value is sent with the request - if the editor were empty, an empty string is sent;


  1. Add an embedded flash movie into an Editor A;
  2. Set its width and height properties to something which makes sense;
  3. Select the contents of the Editor A, and copy it to the clipboard;
  4. Paste the contents of the clipboard into an another editor instance (Editor B);
  5. Try to view the source or get the contents of the Editor B (by JavaScript, or by submitting the underlying form);

For the sake of completeness; when nor the width and height are set, the embedded flash is simply discarded, it is not retained over the copy and paste operation (but at least the editor keeps working).

Change History (3)

comment:1 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: Confirmed added; flash GetRealElement copy paste width height removed
Milestone: CKEditor 3.0
Owner: set to Frederico Caldeira Knabben
Status: newassigned

comment:2 Changed 14 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: assignedclosed

That's a limitation we have with the V2. We have changed the system for V3 exactly because of this issue, and it works well now.

I've added the changelog entry for it with [4046].

comment:3 Changed 14 years ago by Gergely Zayzon

Great, noticed in the meantime that I missed a major version change, and honestly; it looks great ;-)

I'd suggest to change the

if (A.getAttribute('_fckflash'))


if (e&&A.getAttribute('_fckflash'))

in the old version within FCK.GetRealElement(), this ensures that the editor is not blocked (but the flash is discarded) when copying content with embedded flash.

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