#2763: Undo/Redo system porting from v2
-------------------------------+--------------------------------------------
Reporter: garry.yao | Owner: fredck
Type: New Feature | Status: new
Priority: Normal | Milestone: CKEditor 3.0
Component: General | Version:
Keywords: Confirmed Review- |
-------------------------------+--------------------------------------------
Changes (by fredck):
* keywords: Confirmed Review? => Confirmed Review-
* owner: garry.yao => fredck
* status: assigned => new
Comment:
Replying to [comment:5 garry.yao]:
> I don't quite understand the last point since the bookmark nodes will
also be removed just like ordinary bookmark in
''CKEDITOR.dom.range::moveToBookmark''.
Be sure there is a lot of thinking behind everything I've said. I just
avoided wasting time explaining the whys, but here it is: it's a matter of
performance and simplification.
In your current implementation you are doing the following operations to
get an undo snapshot:
1. Save contents snapshot.
2. Create the bookmarks (includes DOM nodes).
3. Save the contents snapshot again, this time with the DOM nodes.
4. Select the bookmarks again, restoring the current selection.
DOM operations are notably slow, and the above operations are totally DOM
based.
Due to your choice, you also need to have two content snapshot saved per
image (steps 1 and 3), which is an unnecessary duplication.
And them, you are forced to do selection manipulation to remove the
bookmark nodes (step 4), which is also unneeded as you already have the
selection before saving.
Other than that, you get a lot of DOM fragmentation, breaking text nodes
to add bookmark nodes. This also impacts in the overall performance of the
editor operations.
The solution I'm proposing is to not touch the DOM or the selection.
Grabbing an image means the following in this case:
1. Save the contents snapshot.
2. Save the bookmarks.
> My original consideration on the unobtrusive bookmark (CreateBookmark2)
is that it might be weaker than current one from PF.
You should give more details regarding your consideration. Based on my
explanation, I can just see the opposite.
> Lacks in this patch
The scope of this ticket is introducing the Undo System, which makes it
possible to Undo/Redo. We don't need to make things Undoable/Readoable
here, so these lacks are not a big issue (for this ticket).
---
Other than the above, your coding style is not yet matching our standards.
There are so many things to fix in this sense that it's easier to just go
ahead fixing instead of explaining them here. (You must adapt yourself to
the project, not the opposite).
This is a critical feature, so to avoid wasting time, I'll be adding a new
patch here, based on your patch. I would ask you to please compare the two
patches, identifying the differences and coming with your comments if you
think something is wrong.
--
Ticket URL: <http://dev.fckeditor.net/ticket/2763#comment:8>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac