How to use the tiptap-commands.setBlockType 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 / Heading.js View on Github external
return this.options.levels.reduce((items, level) => ({
      ...items,
      ...{
        [`Shift-Ctrl-${level}`]: setBlockType(type, { level }),
      },
    }), {})
  }
github apostrophecms / apostrophe / lib / modules / apostrophe-rich-text-widgets / src / apos / tiptap-extensions / Styles.js View on Github external
return attrs => {
      if (attrs.tag === 'p') {
        type = schema.nodes.paragraph;
      }
      return setBlockType(type, {
        class: null,
        ...attrs
      });
    };
  }
github scrumpy / tiptap / packages / tiptap-extensions / src / nodes / CodeBlock.js View on Github external
keys({ type }) {
    return {
      'Shift-Ctrl-\\': setBlockType(type),
    }
  }