How to use the tiptap-commands.wrappingInputRule function in tiptap-commands

To help you get started, we’ve selected a few tiptap-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 scrumpy / tiptap / packages / tiptap-extensions / src / nodes / BulletList.js View on Github external
inputRules({ type }) {
    return [
      wrappingInputRule(/^\s*([-+*])\s$/, type),
    ]
  }
github scrumpy / tiptap / packages / tiptap-extensions / src / nodes / TodoList.js View on Github external
inputRules({ type }) {
    return [
      wrappingInputRule(/^\s*(\[ \])\s$/, type),
    ]
  }
github scrumpy / tiptap / packages / tiptap-extensions / src / nodes / OrderedList.js View on Github external
inputRules({ type }) {
    return [
      wrappingInputRule(
        /^(\d+)\.\s$/,
        type,
        match => ({ order: +match[1] }),
        (match, node) => node.childCount + node.attrs.order === +match[1],
      ),
    ]
  }
github scrumpy / tiptap / packages / tiptap-extensions / src / nodes / Blockquote.js View on Github external
inputRules({ type }) {
    return [
      wrappingInputRule(/^\s*>\s$/, type),
    ]
  }