2020-03-06 03:30:58 +08:00
|
|
|
import { Node } from '@tiptap/core'
|
2020-04-01 04:57:39 +08:00
|
|
|
import { NodeSpec } from 'prosemirror-model'
|
2020-04-24 15:32:37 +08:00
|
|
|
import ParagraphComponent from './paragraph.vue'
|
2020-03-06 03:30:58 +08:00
|
|
|
|
|
|
|
export default class Paragraph extends Node {
|
|
|
|
|
|
|
|
name = 'paragraph'
|
|
|
|
|
2020-04-01 04:57:39 +08:00
|
|
|
schema(): NodeSpec {
|
2020-03-29 06:54:49 +08:00
|
|
|
return {
|
|
|
|
content: 'inline*',
|
|
|
|
group: 'block',
|
|
|
|
parseDOM: [{ tag: 'p' }],
|
|
|
|
toDOM: () => ['p', 0],
|
2020-04-26 04:40:38 +08:00
|
|
|
toVue: ParagraphComponent,
|
2020-03-29 06:54:49 +08:00
|
|
|
}
|
2020-03-06 03:30:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|