1

I am trying create my android app for creating and editing text documents. But I am stuck upon a problem of providing the undo and redo feature of text editor. Almost all text editors have this feature. Can someone give some pointers on how these are implemented?

I thought of creating savepoints like as we do in databases by creating redundant copies of this text document and rollback for undo operation.

But it would be an overkill, since we most often change few characters between each savepoint.

Can someone provide me pointers to guide in the right direction?

Also, I am not particularly interested in Android solution. Any language(c,c++,java) is also fine by me.

  • I'm afraid this is a tad too broad to answer. What have you tried yourself? What principles have you considered using? – CodeCaster Jul 23 '17 at 11:34
  • Have a look at https://en.wikipedia.org/wiki/Command_pattern, in particular "Multi-level undo" – mcdowella Jul 23 '17 at 12:09

0 Answers0