How to use the @tiptap/core.Extension.create function in @tiptap/core

To help you get started, we’ve selected a few @tiptap/core 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 gitlabhq / gitlabhq / spec / frontend / content_editor / components / toolbar_button_spec.js View on Github external
const buildEditor = () => {
    toggleFooSpy = jest.fn();
    tiptapEditor = createContentEditor({
      extensions: [
        {
          tiptapExtension: Extension.create({
            addCommands() {
              return {
                toggleFoo: () => toggleFooSpy,
              };
            },
          }),
        },
      ],
      renderMarkdown: () => true,
    }).tiptapEditor;

    jest.spyOn(tiptapEditor, 'isActive');
  };

@tiptap/core

headless rich text editor

MIT
Latest version published 21 hours ago

Package Health Score

92 / 100
Full package analysis