0.1.3 • Published 7 days ago

tiptap-extension-auto-joiner v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 days ago

Tiptap Extension: AutoJoiner

Install

NPM

$ npm install tiptap-extension-auto-joiner

Yarn

$ yarn add tiptap-extension-auto-joiner

Usage

import AutoJoiner from 'tiptap-extension-auto-joiner'

new Editor({
  extensions: [
    AutoJoiner,
  ],
})

This extension provides the expected behavior for lists, e.g. joining two adjacent lists to one. It can be extended to join not only lists, but all types of nodes that are next to each other, such as paragraphs or custom nodes.

Configuration

Optionally, you can also configure which nodes should be joined if they end up next to each other. By default, only ordered lists are joined with ordered lists and unordered lists are joined with unordered lists.

import AutoJoiner from 'tiptap-extension-auto-joiner'

new Editor({
  extensions: [
    AutoJoiner.configure({
      elementsToJoin: ["paragraph", "myCustomNode"] //Default ["bulletList", "orderedList"]
    }),
  ],
})
0.1.2

24 days ago

0.1.3

7 days ago

0.1.1

1 month ago

0.1.0

1 month ago