vue integrated rich text NEditor

Download NEditor vue project on the following public documents.

 

Installation     vue-neditor-wrap execute the command

npm install shock-neditor-wrap

 

 

Use Code 

 

 

<VueNeditorWrap
ref="VueNeditorWrap"
v-model="content"
:config="myConfig"
:destroy="false"
@ready="ready"
></VueNeditorWrap>
 
myConfig: {
// If you need to upload, find the back-end server interface small partners to address
serverUrl:
globalAPI.sysAPIs.itsm_sys_common.itsm_sys_common_upload_api.url,
// path to your UEditor storage resources, relative to the packed index.html
UEDITOR_HOME_URL: "/NEditor/",
// Editor does not automatically content stays high
autoHeightEnabled: false,
// initial container height
initialFrameHeight: 240,
// The initial width of the container
initialFrameWidth: "100%",
// turn off auto-save
enableAutoSave: false,
// if the read-only
readonly: false,
// maximum number of words
maximumWords: 2000,
// Close Count
// wordCount: false,
// // close elementPath
// elementPathEnabled: false,
toolbars: [
[
"source",
"|",
"undo",
"redo",
"|",
"bold",
"italic",
"underline",
"fontborder",
"strikethrough",
"superscript",
"subscript",
"removeformat",
"formatmatch",
"autotypeset",
"blockquote",
"pasteplain",
"|",
"forecolor",
"backcolor",
"insertorderedlist",
"insertunorderedlist",
"selectall",
"cleardoc",
"|",
"rowspacingtop",
"rowspacingbottom",
"lineheight",
"|",
"customstyle",
"paragraph",
"fontfamily",
"fontsize",
"|",
"directionalityltr",
"directionalityrtl",
"indent",
"|",
"justifyleft",
"justifycenter",
"justifyright",
"justifyjustify",
"|",
"touppercase",
"tolowercase",
"|",
"link",
"unlink",
"anchor"
]
]
},
content: ""

 

Guess you like

Origin www.cnblogs.com/hucoke/p/11313591.html
Recommended