how to use the Editor class as global?
main.js:
import { Editor, EditorContent, EditorMenuBar } from 'tiptap'
Vue.component('EditorContent' , EditorContent);
Vue.component('EditorMenuBar' , EditorMenuBar);
but I don't know how to use the "Editor" as global.
It's hard to understand what exactly you're trying to achieve, but if you want it globally - try:
window.Editor = Editor;
then you can use window.Editor anywhere.
He wants to register the editor as global component in main.js (Vue docs) - something like:
import { Editor, EditorContent, EditorMenuBar } from 'tiptap';
Vue.use(Editor);
I like to do the same, but can not find anything about it.
@nekooee: a workaround could be to make a wrapper component and register it global.
Try creating a TipTap component and register that as a global component. Or use window.Editor to have global access to your instance.
Hope that helps!