Skip to content
Prev Previous commit
Next Next commit
fix(editorAPI): Expose onLoaded handler
Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Oct 10, 2023
commit 0bfb7a295230f600764b3e09b3cfbf222b008fd2
2 changes: 2 additions & 0 deletions src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ window.OCA.Text.createEditor = async function({
readOnly = false,
autofocus = true,

onLoaded = () => {},
onUpdate = ({ markdown }) => {},
onOutlineToggle = (visible) => {},
onLinkClick = undefined,
Expand Down Expand Up @@ -191,6 +192,7 @@ window.OCA.Text.createEditor = async function({
store,
})
return new TextEditorEmbed(vm, data)
.onLoaded(onLoaded)
.onUpdate(onUpdate)
.onOutlineToggle(onOutlineToggle)
.render(el)
Expand Down