mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-25 21:19:06 +08:00
18 lines
332 B
TypeScript
18 lines
332 B
TypeScript
import { Node } from '@tiptap/core'
|
|
import { NodeSpec } from 'prosemirror-model'
|
|
|
|
export default class Paragraph extends Node {
|
|
|
|
name = 'paragraph'
|
|
|
|
schema(): NodeSpec {
|
|
return {
|
|
content: 'inline*',
|
|
group: 'block',
|
|
draggable: false,
|
|
parseDOM: [{ tag: 'p' }],
|
|
toDOM: () => ['p', 0],
|
|
}
|
|
}
|
|
|
|
} |