Closed maisasb closed 1 year ago
same here
+1
Is there any update on this? I noticed this issue is closed, but my team just ran into a similar issue. We're using the composition API and received this error:
TypeError: (0 , _vue.useEditor) is not a function
@maisasb I'm seeing this issue as well. Do you have any recommendation on what needs to be done to get the tests passing?
@jaek-s were you able to resolve the issue?
My guess would be CJS vs ESM imports
@nperez0111 thanks for your input! I got it working with below for both runtime and testing:
import * as tiptap from '@tiptap/vue-3';
const { Editor, EditorContent, FloatingMenu, BubbleMenu } = tiptap;
Which packages did you experience the bug in?
@tiptap/vue-3
What Tiptap version are you using?
2.0.3
What’s the bug you are facing?
I am migrating Vue 2 (2.7.10) project to Vue 3 (3.3.4) and I installed the @tiptap/vue-3 (2.0.3) package, the component works fine but all tests are breaking with @testing-library/vue.
The error I am facing: And we can't mock and do anything to pass the tests :/
What browser are you using?
Chrome
Code example
https://github.com/maisasb/tiptap-error
What did you expect to happen?
The tests pass and dont break in Editor constructor
Anything to add? (optional)
No response
Did you update your dependencies?
Are you sponsoring us?