How to redo text in text editor

How can I redo text in text field.

Redo Means - reverse undo or get text back after undo.

Can anyone share me the code.
Please help.

What do you mean “redo” ? You mean what happens in Word when you type Ctrl-Z or Cmd-Z ? “Undo” ?

reverse undo or get text back after undo.

You mean “reverse delete”, or revert to the previous version after wrong entry, right ?

A simple way consist in placing the current version of the text into a pile.

In effect, each time a key is hit, in the TextChanged event for instance the whole content of the text editor is placed into an array.

What Undo does is to fetch the version before. If the undo pile exceeds the number of levels desired (for instance 10), the element zero is deleted.

Some discussion here: undo/redo strategy
Commercial solution here: TheBigUndo – piDog Software

2 Likes

can you please me with script or code.