Skip to content
Prev Previous commit
Next Next commit
fix(editorApi): expose save function
Signed-off-by: Jonas <jonas@freesources.org>
  • Loading branch information
mejo- authored and backportbot-nextcloud[bot] committed Oct 10, 2023
commit e305b2efcaf6e79fa6341b67ba34aed9f2021b69
4 changes: 4 additions & 0 deletions src/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,10 @@ export default {
this.emit('delete-image-node', imageUrl)
},

async save() {
await this.$syncService.save()
},

async close() {
if (this.currentSession && this.$syncService) {
try {
Expand Down
4 changes: 4 additions & 0 deletions src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ class TextEditorEmbed {
return this
}

async save() {
return this.#vm.$children[0].save?.()
}

setShowOutline(value) {
this.#vm.$set(this.#data, 'showOutlineOutside', value)
return this
Expand Down