tiny-markdown-editor icon indicating copy to clipboard operation
tiny-markdown-editor copied to clipboard

Undo/redo events not being handled

Open Inparsian opened this issue 1 year ago • 6 comments

Undo/redo input events are not handled whenever text is inserted, a character is deleted, text is pasted, etc. They are however handled whenever multiple lines of text are deleted at once, which is confusing because it doesn't look like the editor has a function to handle these kinds of input events.

Inparsian avatar Jan 06 '24 13:01 Inparsian

yeah, undo/redo events are definitely not handled deliberately, and I don't think it's easy to add proper undo/redo handling so I'm not really planning to add that

jefago avatar Jan 15 '24 16:01 jefago

I got somewhat close to getting an undo/redo stack working for the editor actually, but I'm not really sure how to work around the weirdness of editable elements. It's kind of bizarre how only multi-line deletion is undoable

Inparsian avatar Jan 15 '24 21:01 Inparsian

could it be related to built-in undo functionality of a linked textarea?

jefago avatar Jan 16 '24 08:01 jefago

I don't think so, it's happening even if a textarea is not linked to the editor

Inparsian avatar Jan 16 '24 14:01 Inparsian

Oh darn! Thank you again with your response to my earlier issue, and glad it may have made other installations for others go smoother, but after getting it running and messing around with the styling a bit I too was disappointed to find undo wasn't supported.

+1 for interest n this feature.

AustinFoss avatar Mar 06 '24 19:03 AustinFoss

I would love an undo feature as well

kitsuneyo avatar Jun 12 '24 10:06 kitsuneyo