UNPKG

velaris-richtext-editor

Version:

A modern WYSIWYG rich text editor based on tiptap and shadcn ui for React

34 lines (33 loc) 748 B
import { N as e, m as i } from "./index-Drmyqk9P.js"; const s = e.create({ name: "listItem", addOptions() { return { HTMLAttributes: {}, bulletListTypeName: "bulletList", orderedListTypeName: "orderedList" }; }, content: "paragraph block*", defining: !0, parseHTML() { return [ { tag: "li" } ]; }, renderHTML({ HTMLAttributes: t }) { return ["li", i(this.options.HTMLAttributes, t), 0]; }, addKeyboardShortcuts() { return { Enter: () => this.editor.commands.splitListItem(this.name), Tab: () => this.editor.commands.sinkListItem(this.name), "Shift-Tab": () => this.editor.commands.liftListItem(this.name) }; } }); export { s as ListItem };