欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!
  安装vue-neditor-wrap执行命令
 
  npminstallvue-neditor-wrap
 
  代码使用
 
  <VueNeditorWrap
 
  ref="VueNeditorWrap"
 
  v-model="content"
 
  :config="myConfig"
 
  :destroy="false"
 
  @ready="ready"
 
  ></VueNeditorWrap>
 
  myConfig:{
 
  //如果需要上传功能,找后端小伙伴要服务器接口地址
 
  serverUrl:
 
  globalAPI.sysAPIs.itsm_sys_common.itsm_sys_common_upload_api.url,
 
  //你的UEditor资源存放的路径,相对于打包后的index.html
 
  UEDITOR_HOME_URL:"/NEditor/",
 
  //编辑器不自动被内容撑高
 
  autoHeightEnabled:false,
 
  //初始容器高度
 
  initialFrameHeight:240,
 
  //初始容器宽度
 
  initialFrameWidth:"100%",
 
  //关闭自动保存
 
  enableAutoSave:false,
 
  //是否只读
 
  readonly:false,
 
  //最大字数
 
  maximumWords:2000,
 
  //关闭字数统计
 
  //wordCount:false,
 
  ////关闭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:""

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/html/h56695.shtml