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
I'm working on implementing an image node that is built in multiple steps:
User uploads an image file
Image node is created, without a src attribute and suspends
API call goes to the backend to retrieve a pre-signed URL to upload the image as well as an s3 key where the image will be stored
Image component receives the s3 key and stores it for serialization (the src of the image is not serialized in order to compress it)
Image ends suspension
Later, when the saved editor is opened up again, the s3 key is used again to ask the backend for a pre-signed url to use as the src for the image (suspending while it waits async)
Because this is a multiple step process involving multiple changes to the editor, the action of adding an image to the editor cannot be undone in one ctrl+z. I would like to be able to specify in some way for a set of commands to not be added to the undo stack, or to be added to the undo stack as one batched change
I haven't been able to find any good examples online or in the documentation of how to use the @lexical/history library to do this, it seems this only really supports undoing, redoing, clearing the editor, and sharing history between components.
The text was updated successfully, but these errors were encountered:
I'm working on implementing an image node that is built in multiple steps:
Because this is a multiple step process involving multiple changes to the editor, the action of adding an image to the editor cannot be undone in one
ctrl+z
. I would like to be able to specify in some way for a set of commands to not be added to the undo stack, or to be added to the undo stack as one batched changeI haven't been able to find any good examples online or in the documentation of how to use the
@lexical/history
library to do this, it seems this only really supports undoing, redoing, clearing the editor, and sharing history between components.The text was updated successfully, but these errors were encountered: