# vue-trix
**Repository Path**: qscgu23/vue-trix
## Basic Information
- **Project Name**: vue-trix
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-08-26
- **Last Updated**: 2021-08-26
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Vue-Trix Text Editor
[](https://www.npmjs.com/package/vue-trix) [](https://ci.appveyor.com/project/tranduchanh/vue-trix/branch/master)
Simple and lightweight [Trix](https://www.npmjs.com/package/trix) rich-text editor Vue.js component for writing daily
## Table of Contents
- [Vue-Trix Text Editor](#vue-trix-text-editor)
- [Table of Contents](#table-of-contents)
- [Getting started](#getting-started)
- [Demo page](#demo-page)
- [Integrate into the form](#integrate-into-the-form)
- [Features](#features)
- [Installation](#installation)
- [NPM](#npm)
- [YARN](#yarn)
- [Or directly from latest Github repo](#or-directly-from-latest-github-repo)
- [Mount](#mount)
- [Mount with global](#mount-with-global)
- [Mount with component](#mount-with-component)
- [Setup with Nuxt.js (SSR)](#setup-with-nuxtjs-ssr)
- [Component Usages](#component-usages)
- [Create a simple editor in your single component file](#create-a-simple-editor-in-your-single-component-file)
- [Integrating with Forms](#integrating-with-forms)
- [Props descriptions](#props-descriptions)
- [Populating editor content](#populating-editor-content)
- [Init loading content into the editor](#init-loading-content-into-the-editor)
- [Track data changes](#track-data-changes)
- [Binding attachment events](#binding-attachment-events)
- [Process uploading attachment to remote server](#process-uploading-attachment-to-remote-server)
- [Trix document](#trix-document)
- [Contributing](#contributing)
## Getting started
### [Demo page](/example)

### Integrate into the form

## Features
- A simple and lightweight rich-text editor for writing daily.
- Two-ways binding with `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).
## Installation
### NPM
```Shell
$npm install --save vue-trix
```
### YARN
```Shell
$yarn add vue-trix
```
### Or directly from latest Github repo
```Shell
$npm install --save hanhdt/vue-trix
```
## Mount
### Mount with global
in the `main.js`, import the package as a global component.
```javascript
import "vue-trix";
```
### Mount with component
```javascript
import VueTrix from "vue-trix";
export default {
// ...
components: {
VueTrix
}
};
```
### Setup with Nuxt.js (SSR)
Create mounting plugin file
```javascript
// plugins/vue_trix.js
import Vue from "vue";
import VueTrix from "vue-trix";
Vue.use(VueTrix);
```
Update Nuxt.js config file
```javascript
// nuxt.config.js
plugins: [{ src: "~/plugins/vue_trix", mode: "client" }];
```
## Component Usages
### Create a simple editor in your single component file
Add `VueTrix` component into `*.vue` template
```XML