diff options
author | Azul <azul@riseup.net> | 2020-05-16 13:05:07 +0300 |
---|---|---|
committer | Azul <azul@riseup.net> | 2020-05-25 09:23:03 +0300 |
commit | 1fce60a657c99cfc31af729f80016884d014e41d (patch) | |
tree | f7f65cd0ec523282a0996b878be14775af0e0929 /src | |
parent | 63610978103997d2957dbc241cad838c80329eeb (diff) |
emit `ready` signal via parent
Emit the `ready` signal via `$parent` as well.
In a wiki app we render a preview of the markdown content
while loading the text editor.
In order to know when the text editor is ready
we need `ready` to be emitted by the parent.
Alternatives:
* We are currently using the ViewerComponent in our app.
Just reemitting `ready` from it would work as well.
* Ideally we would be able to build our own component
based on the EditorWrapper component.
Making the `EditorWrapper` public would work as well -
but i guess that is not really an option
because it may change or disappear in the future.
Signed-off-by: Azul <azul@riseup.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/components/EditorWrapper.vue | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/components/EditorWrapper.vue b/src/components/EditorWrapper.vue index 8d3a1b776..5e03397e6 100644 --- a/src/components/EditorWrapper.vue +++ b/src/components/EditorWrapper.vue @@ -385,6 +385,7 @@ export default { this.tiptap.focus('start') } this.$emit('ready') + this.$parent.$emit('ready', true) } if (Object.prototype.hasOwnProperty.call(state, 'dirty')) { this.dirty = state.dirty |