diff --git a/src/components/Editor.js b/src/components/Editor.js index 197096e976d..d61fd7c9cb9 100644 --- a/src/components/Editor.js +++ b/src/components/Editor.js @@ -7,7 +7,7 @@ import { defineComponent, h, nextTick, ref, watch } from 'vue' import Editor from './Editor.vue' export default defineComponent({ - emits: ['focus', 'ready', 'create:content', 'update:content'], + emits: ['focus'], props: Editor.props, setup(props, { attrs, emit, slots }) { const reloading = ref(false) @@ -25,10 +25,7 @@ export default defineComponent({ props, on: { focus: () => emit('focus'), - ready: () => emit('ready'), reload: () => (reloading.value = true), - 'create:content': (content) => emit('create:content', content), - 'update:content': (content) => emit('update:content', content), }, scopedSlots: slots, }) diff --git a/src/editor.js b/src/editor.js index a9bc13a3b0a..27b0b4f11c8 100644 --- a/src/editor.js +++ b/src/editor.js @@ -36,7 +36,12 @@ class TextEditorEmbed { } #getEditorComponent() { - return this.#vm.$children[0] + let component = this.#vm.$children[0] + // For session editors, there's an extra wrapper component before Editor.vue + if (component && !('editor' in component)) { + component = component.$children[0] + } + return component } onCreate(onCreateCallback = () => {}) {