How to use the tiptap.PluginKey function in tiptap

To help you get started, we’ve selected a few tiptap 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 / extensions / TrailingNode.js View on Github external
get plugins() {
    const plugin = new PluginKey(this.name)
    const disabledNodes = Object.entries(this.editor.schema.nodes)
      .map(([, value]) => value)
      .filter(node => this.options.notAfter.includes(node.name))

    return [
      new Plugin({
        key: plugin,
        view: () => ({
          update: view => {
            const { state } = view
            const insertNodeAtEnd = plugin.getState(state)

            if (!insertNodeAtEnd) {
              return
            }

tiptap

A rich-text editor for Vue.js

MIT
Latest version published 3 years ago

Package Health Score

71 / 100
Full package analysis