UNPKG

tiptap-markdown

Version:
24 lines (20 loc) 512 B
import { Node } from "@tiptap/core"; import { defaultMarkdownSerializer } from "prosemirror-markdown"; const ListItem = Node.create({ name: 'listItem', }); export default ListItem.extend({ /** * @return {{markdown: MarkdownNodeSpec}} */ addStorage() { return { markdown: { serialize: defaultMarkdownSerializer.nodes.list_item, parse: { // handled by markdown-it }, } } } });