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
[ ] Implement the add core function in the HistoryManager class.
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 theadd
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 byinsert
of the editorjs block API.Objective
add
core function in theHistoryManager
class.