Giter Club home page Giter Club logo

tiptap-vuetify-nuxt's Introduction

tiptap-vuetify with Nuxt

Play on Codesanbox: https://codesandbox.io/s/github/iliyaZelenko/tiptap-vuetify-nuxt/tree/master/

Important parts

Transpile

It is important to specify transpile (link to code below).

build: {
  transpile: ['vuetify/lib', 'tiptap-vuetify']
}

Load icons

I put links to icon styles in link array, most likely you only need your kind of icons and you can load the icons in a different way, not like below (link to code below).

link: [
  { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
  // Iconfonts for Vuetify. You need to leave only which one you use
  { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons' },
  { rel: 'stylesheet', href: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css' },
  { rel: 'stylesheet', href: 'https://cdnjs.cloudflare.com/ajax/libs/MaterialDesign-Webfont/4.4.95/css/materialdesignicons.min.css' }
]

Plugin

It can be seen that I created and connected the plugin.

import Vue from 'vue'
import { TiptapVuetifyPlugin } from 'tiptap-vuetify'
import 'tiptap-vuetify/dist/main.css'

export default ({ app }) => {
  Vue.use(TiptapVuetifyPlugin, {
    // Below is an IMPORTANT line.
    vuetify: app.vuetify,
    iconsGroup: 'mdi'
  })
}

And include it (nuxt.config.js):

plugins: [
  { src: '~/plugins/TiptapVuetify', mode: 'client' }
],

Vuetify object (new Vuetify(opts)) is in app.vuetify because of @nuxtjs/vuetify module, if you do not use @nuxtjs/vuetify and initialize Vuetify yourself, then do not forget to pass the Vuetify object as in the code above. You can read more on Vuetify's docs.

About Nuxt's plugins documentation here.


Build Setup

# install dependencies
$ yarn install

# serve with hot reload at localhost:3000
$ yarn run dev

# build for production and launch server
$ yarn run build
$ yarn start

# generate static project
$ yarn run generate

For detailed explanation on how things work, checkout Nuxt.js docs.

tiptap-vuetify-nuxt's People

Contributors

dependabot[bot] avatar iliyazelenko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tiptap-vuetify-nuxt's Issues

Menu bubble?

Nice work.. and almost all we need. Question is how to use the modern menu-bubble instead of ordinary menu bar?

Help Needed - Question - How to show the loaded content to users?

Hi,

This might be a basic question, but i am little puzzled.

Lat's say i created a blog post content using this package.

Now how do i show this content on the single post page which is visible to end users.

do I use <div v-html="MyPostContent"> Vue/Nuxt warns us about not to use v-html. SO just wanted to know how do we actually show this data after posting.

Using Nuxt: Module parse failed: Unexpected token

getting error
Module parse failed: Unexpected token (4925:17)
You may need an appropriate loader to handle this file type.
| render(h, context) {
| const data = {
| props: { ...context.props,
| name
| },
whenever I try to build

Compiling Error

I keep getting this error after following your steps. Any Advice on how to solve this?

This relative module was not found: friendly-errors 11:21:53
friendly-errors 11:21:53

  • ../components/Editor in ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/create-cnote/index.vue?vue&type=script&lang=js& friendly-errors 11:21:53

Demo Config doesnt work in Nuxt >v2.9 using buildModules

My nuxt version is 2.15.3 and when I try to load a page with tiptap I get:

ERROR [Vue warn]: Error in data(): "TypeError: components_Editor__WEBPACK_IMPORTED_MODULE_1_.default is not a constructor"

How can I setup tiptap-vuetify when @nuxtjs/vuetify is build in buildModules instead of modules?

nuxt.config.js

    buildModules: [
        // https://go.nuxtjs.dev/eslint
        '@nuxtjs/eslint-module',
        // https://go.nuxtjs.dev/vuetify
        '@nuxtjs/vuetify',
    ],
    build: {
        extend(config, { isClient, isDev }) {
            if (isClient) {
                config.devtool = isDev ? '#source-map' : '';
            } else config.devtool = isDev ? 'inline-source-map' : '';
        },
        transpile: ['vuetify/lib', 'tiptap-vuetify'],
    },
```

Tiptap with Nuxt (without Vuetify)

Thanks for creating this.

I've been looking for an integration of tiptap (which looks great) and Nuxt. Is there a way to do that without Vuetify (which is bloated and too much for my needs)? Does this repo allow that, and if so how can I get that working?

passing the data to component input

Good day, may I ask what is the best approach when passing a data, without using v-model? Because this throws me an error.

Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "content"

How to add custom item in toolbar?

Hi Thank you for this package.

Could you please assist how I can add custom item on toolbar?

I am looking for image upload option in toolbar. Do you have any working example of image upload?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.