How to use the prosemirror-commands.autoJoin function in prosemirror-commands

To help you get started, we’ve selected a few prosemirror-commands 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 nib-edit / Nib / packages / core / src / plugins / list / commands.js View on Github external
const wrapIntoList = (state, dispatch, listType) => {
  return baseCommand.autoJoin(
    wrapInList(listType),
    (before, after) => before.type === after.type && before.type === listType
  )(state, dispatch);
};