tui.editor icon indicating copy to clipboard operation
tui.editor copied to clipboard

Is there any way to exempt the editor's initial state from the undo list?

Open Martin-Alexander opened this issue 1 year ago • 1 comments

When the editor is loaded with an initial value (for instance, the demo here https://ui.toast.com/tui-editor) issuing an undo command (e.g., with Cmd+Z on macOS) all the content in the editor is deleted.

Most editors and text inputs don't work this way and users seem to find it confusing (and especially frustrating if they're not familiar with the redo shortcut).

Is there a way of preventing this behaviour? Perhaps by clearing the undo history when the editor loads?

Martin-Alexander avatar Oct 12 '23 17:10 Martin-Alexander

Yes, it's an API design problem. The only way I got around it was to put onKeyDown processing on the wrapper component.

prostoandrei avatar Jan 23 '24 14:01 prostoandrei