tiptap/packages/extension-paragraph/index.ts

17 lines
277 B
TypeScript
Raw Normal View History

2020-03-06 03:30:58 +08:00
import { Node } from '@tiptap/core'
export default class Paragraph extends Node {
name = 'paragraph'
2020-03-29 06:54:49 +08:00
schema() {
return {
content: 'inline*',
group: 'block',
draggable: false,
parseDOM: [{ tag: 'p' }],
toDOM: () => ['p', 0],
}
2020-03-06 03:30:58 +08:00
}
}