So i am working on an editor where you can create text items. When i create a text item it is accompanied by a text editor. At the moment they both have their own undo chains. This is because the text editor has build in undo commands that work much smoother then if i were to create it myself. The downside is that all content related stuff is ignored by the editor when undo'ing stuff.

Is this acceptable behavior? Or is there a better solution for this?

1 Answer 1


It's hard to say without understanding your editor a bit more, but...

If you look at Microsoft PowerPoint or Word for example, then the behavior is as with a single undo stack. Similarly for Inkscape. This is because there is no scope switch between the text item and its content. It's all part of the overall editor content. There is a sense of 'editing in place' and the text item belonging to the content structure even during editing.

However, if there is a context or scope switch between the text item and the main content then the edit box should have it's own undo stack. For example, if the text item is not really part of the same content structure (as perceived by the user) - say a comment or note overlaying the overall design. Or if the user is using a popup or dialog or some other overlay to enter the text for the item, then the editing is not 'in place' and the user is clearly switching context to enter the text which will subsequently be pushed back into the editor on completion.

So in summary: is the editing of the text item...

  • part of a different content structure
  • entered via some kind of mode switch
  • seamlessly 'in place'

This should help you answer your own question.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.