@vericus/slate-kit-history
Version:
plugin that group together history of selections to the next editing event on slate for undo/redo
9 lines • 366 B
JavaScript
export default function handleUndo(editor) {
if (!editor.hasUndo())
return;
editor.undo();
if (editor.props.onUndo && typeof editor.props.onUndo === "function") {
editor.props.onUndo(editor.operations.filter(function (operation) { return !!(operation && operation.type !== "set_value"); }));
}
}
//# sourceMappingURL=handleUndo.js.map