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

<script> import: How to get it working? #146

Closed
djhuistra opened this issue Mar 19, 2020 · 3 comments
Closed

<script> import: How to get it working? #146

djhuistra opened this issue Mar 19, 2020 · 3 comments
Labels
bug Something isn't working tiptap wontfix This will not be worked on

Comments

@djhuistra
Copy link

I'm trying to get an import via script tag working, but I have no success so far. I get a Cannot read property 'Editor' of undefined TypeError. I made a small jsfiddle to replicate this: https://jsfiddle.net/cgdmewkn/.

The README.md mentions that the Vuetify object must be set in window.vuetify but I'm not sure how to achieve that.

I would greatly appreciate a working jsfiddle!

@iliyaZelenko
Copy link
Owner

I tried to configure this for an hour, but could not. Here is the code I ended up with.

In general, the tiptap itself apparently does not support CDN, I could not find it in the documentation and other sources. So apparently this is a problem in the tiptap itself.

@djhuistra
Copy link
Author

Thanks a lot for your effort in to try tot get it to work! It is unfortunate that it seems to be a tiptap issue, but that is also good to know.

@renedekat
Copy link

renedekat commented Apr 3, 2020

@djhuistra In your main.js file you need to import the plugin

import vuetify from './plugins/vuetify';

import { TiptapVuetifyPlugin } from 'tiptap-vuetify';
Vue.use(TiptapVuetifyPlugin, {
  // the next line is important! You need to provide the Vuetify Object to this place.
  vuetify, // same as "vuetify: vuetify"
  // optional, default to 'md' (default vuetify icons before v2.0.0)
  iconsGroup: 'fa'
});

My plugins file: plugins/vuetify.js

import Vue from 'vue';
import Vuetify from 'vuetify/lib';

Vue.use(Vuetify);
export default new Vuetify({
  icons: {
    iconfont: 'fa',
  },
});

Then you can use it in your component as described in step 2 https://vuejsexamples.com/wysiwyg-editor-for-vuetify-component-simplifies-integration-tiptap-with-vuetify/

@iliyaZelenko iliyaZelenko added bug Something isn't working wontfix This will not be worked on labels Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tiptap wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants