add renderless MenuBar

This commit is contained in:
Philipp Kühn
2018-11-04 22:43:26 +01:00
parent d4f6708daa
commit 32c62b85ca
7 changed files with 115 additions and 113 deletions

View File

@@ -5,17 +5,17 @@ export default {
type: Object,
},
},
render(createElement) {
render() {
if (!this.editor) {
return null
}
return createElement('div', this.$scopedSlots.default({
return this.$scopedSlots.default({
focused: this.editor.view.focused,
focus: this.editor.focus,
commands: this.editor.commands,
isActive: this.editor.isActive.bind(this.editor),
markAttrs: this.editor.markAttrs.bind(this.editor),
}))
})
},
}