tiptap/packages/extension-paragraph/index.ts
Philipp Kühn c2bd2b21fa refactoring
2020-04-23 22:10:45 +02:00

17 lines
308 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',
parseDOM: [{ tag: 'p' }],
toDOM: () => ['p', 0],
}
}
}