Is there a way to extend Undo/Redo with additional custom operations with the goal to Undo/Redo binary file content.

I have use case for binary content change which is not undone. I am adding paste image into Markdown file to my plugin.

One option is to paste an image on an existing image link to replace the content of the target image file with the clipboard image content. 

If the paste operation creates a new file then undo will delete it and redo will create it, if the file already exists undo does not restore the original file content.

Is there a possibility of extending undo functionality with custom operations to allow undo/redo to handle image file changes? 

It would be good to have undo restore the original binary content of an image file modified in this case because the content change appears to the user as part of an editing operation.

 

0

It's currently not possible, unfortunately: IDEA-99788

0

请先登录再写评论。