kommitters / editorjs-undo

Undo/Redo feature for Editor.js
https://www.npmjs.com/package/editorjs-undo
MIT License
163 stars 50 forks source link

Implement the add core function #259

Closed juliandsg0222 closed 3 weeks ago

juliandsg0222 commented 3 weeks ago

Context

The next step in the refactoring of editorjs-undo is to create the core functions for the HistoryManager class, this time we need to implement the add method that allows to retrieve the last deleted state and insert it in the index of the corresponding block.

According to the editorjs limitations, the insertion in the zero index will be handled by the move function and not directly by insert of the editorjs block API.

Objective