How to use the prosemirror-history.undoDepth function in prosemirror-history

To help you get started, we’ve selected a few prosemirror-history examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ifiokjr / remirror / @remirror / core-extensions / src / extensions / history.ts View on Github external
return ({ command }) => {
      switch (command) {
        case 'undo':
          return undoDepth(getState()) > 0;
        case 'redo':
          return redoDepth(getState()) > 0;
        default:
          return false;
      }
    };
  }
github ifiokjr / remirror / @remirror / core-extensions / src / extensions / history-extension.ts View on Github external
return ({ command }: { command?: string }) => {
      switch (command) {
        case 'undo':
          return undoDepth(getState()) > 0;
        case 'redo':
          return redoDepth(getState()) > 0;
        default:
          return false;
      }
    };
  }

prosemirror-history

Undo history for ProseMirror

MIT
Latest version published 1 month ago

Package Health Score

74 / 100
Full package analysis

Similar packages