Disable undo / redo in HTML input field

I use asp.net input fields and they automatically provide undo / redo functions. I use JavaScript to format the value of an input field, however this destroys the undo / redo history.

  • Is there any way to disable the undo / redo function?

    or

  • Is there a way to interact with the undo / redo history to add the correct values?
+4
source share
1 answer

Using JavaScript, try replacing the text box with a new one, and then set the value. New field, new undo buffer, right?

JQuery

$('#theTextField').after('<textarea id="theTextField2"></textarea>').remove(); $('#theTextField2').attr('id','theTextField'); 
+3
source

All Articles