zoukankan      html  css  js  c++  java
  • vue 集成 NEditor 富文本

    下载NEditor 放在  vue 项目下面 public  文件中。

    安装    vue-neditor-wrap  执行命令

    npm  install  vue-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: ""
  • 相关阅读:
    阻塞IO与非阻塞IO
    Java 中 IO 流分为几种?BIO,NIO,AIO 有什么区别?
    linux7启动时自动启动zookeeper和Tomcat
    linux7下配置Tomcat
    背景图片变色,或者背景渐变
    Linux7版本网络配置
    linux7中jdk安装
    linux7中zookeeper的安装-依赖于jdk
    Avoided redundant navigation to current location
    Auto Fix is enabled by default. Use the single string form
  • 原文地址:https://www.cnblogs.com/hucoke/p/11313591.html
Copyright © 2011-2022 走看看