You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After applying an operation from the icon menu that pops up when a block receives focus, if you attempt to undo using CTRL + Z, the operation is not undone.
The text was updated successfully, but these errors were encountered:
@dmntswntrs, I noticed the same in my own instance of editable. I’ve played around a bit and it looks like undo works for as long as you type new text and undo. If you delete text, undo creates a selection of the first undone character only and then stops. Undoing formatting (e.g. making text bold and undoing that) doesn’t seem to work either.
The issue is that the undo of the browser gets disrupted whenever we change the HTML inside a contenteditable. And due to the still poor state of contenteditable implementations across browsers this is surprisingly hard to fix.
At this moment this is out of scope of editable.js unless someone wants to give it a go.
(fyi: At Livingdocs we have solved the undo functionality outside of contenteditable)
@peyerluk, thanks! I previously used a simplistic approach that continuously snapshotted the content (similar to your extractContent() function) of a contenteditable. That felt tedious, though, and I’ve never bothered to refine the approach or to look for better alternatives… 🤔
After applying an operation from the icon menu that pops up when a block receives focus, if you attempt to undo using CTRL + Z, the operation is not undone.
The text was updated successfully, but these errors were encountered: