UNPKG

tiptap

Version:

A rich-text editor for Vue.js

27 lines (21 loc) 426 B
import { setBlockType } from 'tiptap-commands' import Node from '../Utils/Node' export default class Paragraph extends Node { get name() { return 'paragraph' } get schema() { return { content: 'inline*', group: 'block', draggable: false, parseDOM: [{ tag: 'p', }], toDOM: () => ['p', 0], } } commands({ type }) { return () => setBlockType(type) } }