Tony
Tony

Reputation: 793

VueJs Medium Editor installation Run through

spent hours trying to figure out how to install Medium Editor in VueJs.

I've managed to make it work on a single page vuejs. But I cannot get it to work when using the webpack file structure:

   ├── main.js                 # app entry file
   ├── App.vue                 # main app component
   ├── components/             # ui components
   │   │   └── ...
   │   └── assets/             # module assets 

I've installed it via npm. Imported stylesheets and scripts. But I cannot get it to run.

I've been using https://www.npmjs.com/package/medium-editor as a guideline.

Could you run me through where to place what?

Thanks so much in advance!

Upvotes: 0

Views: 581

Answers (1)

Srinivas Damam
Srinivas Damam

Reputation: 3045

There is wrapper for this library written in Vue.js.
Here is the link https://franzskuffka.github.io/vue-medium-editor/

Install using

npm i --save vue2-medium-editor

app.js

import Vue from 'vue'
import editor from 'vue2-medium-editor'

new Vue {
  components: {
    'medium-editor': editor
  }
}

index.html

<medium-editor :text='myText' custom-tag='h2' v-on:edit='applyTextEdit'>

If you find any issues, open an issue in the repo.

Upvotes: 0

Related Questions