Simple and lightweight Trix rich-text editor component for Vue.js
NPM
$npm install --save vue-trix
YARN
$yarn add vue-trix
- A simple and lightweight rich-text editor
- Binding with your
v-model
easily - Auto-save editor data temporally what you has typed into the form input in case something goes wrong (for example, the browser could crash or you could accidentally refresh the page without submit saving)
in the main.js
, import the package as a global component.
import 'vue-trix'
import VueTrix from 'vue-trix'
export default {
// ...
components: {
VueTrix
}
}
Add VueTrix
component into *.vue
template
<template>
<!-- ... -->
<VueTrix v-model="editorContent"/>
<!-- ... -->
</template>
<form ...>
<VueTrix inputId="editor1" v-model="editorContent"/>
</form>
inputId
: This is referencedid
of the hidden input field defined
If you're interested in contributing to Vue-Trix, please consider to submitting a pull request or post issues.