tiptap/packages/extension-document/index.ts

16 lines
240 B
TypeScript
Raw Normal View History

2019-12-17 06:20:05 +08:00
import { Node } from '@tiptap/core'
2020-04-01 04:57:39 +08:00
import { NodeSpec } from 'prosemirror-model'
2019-12-17 06:20:05 +08:00
export default class Document extends Node {
2020-03-06 07:15:36 +08:00
name = 'document'
topNode = true
2019-12-17 06:20:05 +08:00
2020-04-01 04:57:39 +08:00
schema(): NodeSpec {
2020-03-29 06:54:49 +08:00
return {
content: 'block+',
}
2019-12-17 06:20:05 +08:00
}
}