mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-12-15 11:09:01 +08:00
add topNode option
This commit is contained in:
parent
54ae2d4a17
commit
0883b01198
@ -33,6 +33,7 @@ export default class Editor extends Emitter {
|
|||||||
autoFocus: null,
|
autoFocus: null,
|
||||||
extensions: [],
|
extensions: [],
|
||||||
content: '',
|
content: '',
|
||||||
|
topNode: 'doc',
|
||||||
emptyDocument: {
|
emptyDocument: {
|
||||||
type: 'doc',
|
type: 'doc',
|
||||||
content: [{
|
content: [{
|
||||||
@ -181,6 +182,7 @@ export default class Editor extends Emitter {
|
|||||||
|
|
||||||
createSchema() {
|
createSchema() {
|
||||||
return new Schema({
|
return new Schema({
|
||||||
|
topNode: this.options.topNode,
|
||||||
nodes: this.nodes,
|
nodes: this.nodes,
|
||||||
marks: this.marks,
|
marks: this.marks,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user