#2817: Adding necessary events for commands
-----------------------+----------------------------------------------------
Reporter: garry.yao | Owner:
Type: Task | Status: new
Priority: Normal | Milestone: CKEditor 3.0
Component: General | Version: SVN
Keywords: |
-----------------------+----------------------------------------------------
I found some commands side behaviors might need to be central controlled
to reduce code DUP:
* ''CKEDITOR.dialog.saveSelection'' plus it's sibling
''CKEDITOR.dialog.restoreSelection'' which has big things to do with
making the selection correct in IE, were Invoked >50 times through
different commands.
* "FCKUndo.SaveUndoStep" back in v2 which support the undo/redo system is
also invoked arround this number in the same case.
I wonder if we can hook these aspects of commands with some new types of
events , the ones I can imagine were:
* ''initCommand'' which fired right after user click/hit the command, was
used to allocate necessary resources for the command, this could be used
to hook things like save the selection.
* ''beforeCommandExe'' which indicate the command is about to make
changes to the document, would be fired at different time for
synchronized(e.g. styles) and asynchronized(e.g. dialogs), highly valuable
for things like save undo stacks.
* "afterCommandExe" on contrast indicate the command has made actually
changes to the documents, used for restore selections and save redo
stacks.
* ''abortCommandExe" would be a branch case if the command has been
canceled and thus has no major effect, which just bring user back to the
document.
--
Ticket URL: <http://dev.fckeditor.net/ticket/2817>
FCKeditor <http://www.fckeditor.net/>
The text editor for Internet
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
FCKeditor-Trac mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fckeditor-trac