Vue development - making use vue2-editor rich text box

1- Installation

npm install --save vue2-editor

Using 2- (main.js)

// Basic Use - Covers most scenarios
import { VueEditor } from 'vue2-editor'
 
// Advanced Use - Hook into Quill's API for Custom Functionality
import { VueEditor, Quill } from 'vue2-editor'


3- using Project

<template>
   <div id="app">
     <vue-editor v-model="content"></vue-editor>
   </div>
 </template>
 
 <script>
   import { VueEditor } from 'vue2-editor'
 
   export default {
 
   components: {
      VueEditor
   },
 
   data() {
       return {
         content: '<h1>Some initial content</h1>'  
       }
     }
   }
 </script> 

Reference: https://www.npmjs.com/package/vue2-editor

Guess you like

Origin blog.csdn.net/samarket/article/details/91490568