Reputation: 793
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
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
import Vue from 'vue'
import editor from 'vue2-medium-editor'
new Vue {
components: {
'medium-editor': editor
}
}
<medium-editor :text='myText' custom-tag='h2' v-on:edit='applyTextEdit'>
If you find any issues, open an issue in the repo.
Upvotes: 0