Tiptap: how to use the Editor class as global?

Created on 24 Oct 2019  路  3Comments  路  Source: ueberdosis/tiptap

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.

feature request

All 3 comments

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pk-pressf1 picture pk-pressf1  路  3Comments

winterdedavid picture winterdedavid  路  3Comments

connecteev picture connecteev  路  3Comments

chrisjbrown picture chrisjbrown  路  3Comments

Auxxxxlx picture Auxxxxlx  路  3Comments