Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue Error in mounted hook: "TypeError: this.editor.create is not a function #177

Closed
xhc-code opened this issue Feb 3, 2021 · 2 comments
Closed
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it.

Comments

@xhc-code
Copy link

xhc-code commented Feb 3, 2021

image
exception info:
Invalid prop: type check failed for prop "editor". Expected Function, got Object
Error in mounted hook: "TypeError: this.editor.create is not a function"

vue page use:
<div class="b-cke-wrapper" > <ckeditor :editor="editor" v-model="editorData" :config="editorConfig" @ready="onEditorReady"></ckeditor> </div>

There is no problem with the next CKEDITOR version. However, this self-built version does not modify any content, but it will prompt that this.editor.create is not a function, which is strange; the solution is to rebuild the next version, and the code can basically be modified without modification. Normal use, I am very confused about the problematic build version.

ckeditor5-balloon-block-build-01.zip

@xhc-code
Copy link
Author

xhc-code commented Feb 3, 2021

If the above abnormal picture cannot be displayed, please see this text version of the stack information.

vue.esm.js?a026:628 [Vue warn]: Invalid prop: type check failed for prop "editor". Expected Function, got Object

found in

--->

vue.esm.js?a026:628 [Vue warn]: Error in mounted hook: "TypeError: this.editor.create is not a function"

found in

--->
at src/components/CKEditor5BalloonBlock.vue

vue.esm.js?a026:1897 TypeError: this.editor.create is not a function
at VueComponent.mounted (ckeditor.js?3730:5)
at invokeWithErrorHandling (vue.esm.js?a026:1863)
at callHook (vue.esm.js?a026:4228)
at Object.insert (vue.esm.js?a026:3148)
at invokeInsertHook (vue.esm.js?a026:6357)
at Vue.patch [as patch] (vue.esm.js?a026:6576)
at Vue._update (vue.esm.js?a026:3954)
at Vue.updateComponent (vue.esm.js?a026:4075)
at Watcher.get (vue.esm.js?a026:4488)
at new Watcher (vue.esm.js?a026:4477)

@FilipTokarski
Copy link
Member

Hi, I checked the build you linked and was able to use it in Vue when I removed Watchdog and rebuilt it.
So it seems that the error is caused by the use of Watchdog, which is not supported in Vue at the moment. You can find more details in this ticket.
I'll close this as a duplicate.

@FilipTokarski FilipTokarski added the resolution:duplicate This issue is a duplicate of another issue and was merged into it. label Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it.
Projects
None yet
Development

No branches or pull requests

2 participants