﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2817	Adding necessary events for commands	Garry Yao		"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."	Task	new	Normal	CKEditor 3.0	General	SVN (FCKeditor) - Retired			
