tiptap/packages/extension-paragraph/index.ts

19 lines
396 B
TypeScript
Raw Normal View History

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-27 15:06:42 +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-27 15:06:42 +08:00
// toVue: ParagraphComponent,
2020-03-29 06:54:49 +08:00
}
2020-03-06 03:30:58 +08:00
}
}