Skip to content

NiclasDev63/tiptap-extension-auto-joiner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"]
    }),
  ],
})

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published