[Project_owners] Manually adding things to the undo pile

Brian King brian at mozdev.org
Tue Oct 14 23:20:54 EDT 2003


Neil Deakin wrote:

> I think you do this by creating an nsITransaction and adding it to the 
> transaction manager. The transaction does the operation and handles 
> undo/redo. There's an example in 
> chrome://editor/content/EditorCommandsDebug.js

editor.beginTransaction();
...
editor.endTransaction();

This creates an undo/redo block. See:

chrome://editor/content/editor.js

Does textbox have an editor object to use this I wonder?

-- 
Brian King
www.mozdev.org
www.mozdevgroup.com



More information about the Project_owners mailing list