add topNode option

This commit is contained in:
Philipp Kühn 2019-06-27 20:02:13 +02:00
parent 54ae2d4a17
commit 0883b01198

View File

@ -33,6 +33,7 @@ export default class Editor extends Emitter {
autoFocus: null,
extensions: [],
content: '',
topNode: 'doc',
emptyDocument: {
type: 'doc',
content: [{
@ -181,6 +182,7 @@ export default class Editor extends Emitter {
createSchema() {
return new Schema({
topNode: this.options.topNode,
nodes: this.nodes,
marks: this.marks,
})