Ticket #3732 (closed New Feature: wontfix)

Opened 5 years ago

Last modified 5 years ago

loadData on wysiwyg mode without iframe reload

Reported by: garry.yao Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Confirmed Cc:


This's derived from #3659.

Does the loadData really needs to be asynchronous? Can't we work directly with the existing document when the user wants to change it instead of being forced to create a new one?

Change History

comment:1 Changed 5 years ago by fredck

  • Keywords Confirmed added

I'm not totally sure about the reasons for recreating the editing area iframe when we want to set the editor data. I think it's related to the full page editing support, where we need to make changes to the <head>, as well as the <body> contents. Or maybe it's even related to FF2 or IE not being able to restart the editing features into the iframe after it. I just remember that there is a reason for it.

I'm leaving this ticket opened for investigation for now. We may check it again in the future, but this is not a priority definitely.

comment:2 Changed 5 years ago by alfonsoml

Yes, working with full page editing will require to recreate all the iframe and wait for the new content to be loaded.

Nevertheless, it might be possible for normal editing to avoid the recreation of the iframe, but that would be only a minor optimization, users must assume that SetData is asynchronous.

A way to keep this fact visible for everyone would be to add a callback parameter to the function, I think that it's pretty common for any asynchronous function to offer such parameter. Yes, people can set up an event listener, but if they just want to execute that code once, having a way to specify the function that will be executed right after his new data is ready will be very useful and will avoid many problems.

It's very easy to point everyone to the definition of the function and say "see there: the second parameter is a callback function that will be executed when the new data is ready"

comment:3 Changed 5 years ago by fredck

  • Keywords Discussion removed
  • Milestone changed from CKEditor 3.x to CKEditor 3.1

I liked the callback parameter approach. It should be even simple to come with a solution for it. Well, we can always make things more complicated, like having to handle subsequent calls to setData (only the last one should have the callback fired).

comment:4 Changed 5 years ago by fredck

  • Status changed from new to closed
  • Resolution set to wontfix
  • Milestone CKEditor 3.1 deleted

The callback feature has been introduced with #4445. I think we should just stick with this solution.

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