UNPKG

@vericus/slate-kit-history

Version:

plugin that group together history of selections to the next editing event on slate for undo/redo

14 lines 447 B
export default function hasUndo(editor, value) { var undos = value ? value.data.get("undos") : editor.value.data.get("undos"); return !(undos && undos .filter(function (undo) { return !(undo.size === 1 && (undo.get(0).type === "set_selection" || undo.get(0).type === "set_value")); }) .isEmpty()); } //# sourceMappingURL=hasUndo.js.map