Opened 15 years ago

Closed 15 years ago

#3732 closed New Feature (wontfix)

loadData on wysiwyg mode without iframe reload

Reported by: Garry Yao Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: Confirmed Cc:

Description

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 (4)

comment:1 Changed 15 years ago by Frederico Caldeira Knabben

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 15 years ago by Alfonso Martínez de Lizarrondo

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 15 years ago by Frederico Caldeira Knabben

Keywords: Discussion removed
Milestone: CKEditor 3.xCKEditor 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 15 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.1
Resolution: wontfix
Status: newclosed

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 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy