public void set_enable_undo
If enabled, changes to this will be saved for undo/redo actions.
This results in an additional copy of text changes and are not stored in secure memory. As such, undo is forcefully disabled when
visibility is set to false.
if undo/redo should be enabled