0.0.8 • Published 5 years ago

vue-rich-text-editor v0.0.8

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

vueRichTextEditor

install size Codacy Badge

Rich Text Editor made with Vue

If you like, please give me a star ♪(^∇^*)

如果你喜欢它,可以给我星星吗 ♪(^∇^*)

demo

English 中文文档

onlineDemo

How to use

import vueRichTextEditor from 'vue-rich-text-editor';
Vue.use(vueRichTextEditor)

<vueRichTextEditor ref="editor"></vueRichTextEditor>

vueRichTextEditor API Doc

props

ParametersDescriptionTypeOptional valuesDefault value
height-StringY'400px'
canEdit-BooleanYtrue
timelyGetHtmlWhether to get HTML in timeBooleanYfalse
langTypeLanguage type, optional values'EN','CN'StringY'EN'
confirmCallBack(type, html)Edit callback functions for hyperlinks and images, need return HTMLFunctionYreturn html
imgUploadCallBack(event)Callback function after clicking upload picture buttonFunctionYInsert selected pictures in Base64 format

methods

Method nameDescriptionParameters
appendHtmlInsert HTML at the end of the document-
setHtml--
getHtml--
insertHtmlInsert HTML at the cursorhtml
setLanguageSetting Language, Chinese and English can be set by langTypelanguage.js

emit

emit nameDescription
htmlChangeif timelyGetHtml is true, this can return html of editor timely

Browser support

IE10+, chrome, firefox or other modern Browser

Upgraded content

0.0.6 (2019-5-24 16:22:25)

Added photo editing and uploading functions

0.0.5 (2019-5-22 16:13:22)

Added the function of editing hyperlinks

more version info