wangEditor富文本配置项详解

1,348 阅读1分钟

所有配置内容


                toolbarKeys: [

                    "bold", // 粗体

                    "underline", // 下划线

                    "italic", // 斜体

                    "through", // 删除线

                    "code", // 行内代码

                    "sub", //下标

                    "sup", // 上标

                    "clearStyle", // 清除样式

                    "color", // 字体颜色

                    "bgColor", // 背景颜色

                    "fontSize", // 字体大小

                    "fontFamily", // 字体

                    "indent", //增加缩进

                    "delIndent", //减少缩进

                    "justifyLeft", //左对齐

                    "justifyRight", //有对齐

                    "justifyCenter", //居中对齐

                    "justifyJustify", //两端对齐

                    "lineHeight", //行高

                    "insertImage", //网络图片

                    "deleteImage", //删除图片

                    "editImage", //编辑图片

                    "viewImageLink", //查看链接

                    "imageWidth30", //

                    "imageWidth50", //

                    "imageWidth100", //

                    "divider", //分割线

                    "deleteDivider", //删除分割线

                    "emotion", //表情

                    "insertLink", //插入链接

                    "editLink", //修改链接

                    "unLink", //取消链接

                    "viewLink", //查看链接

                    "codeBlock", //代码块

                    "blockquote", //引用

                    "headerSelect", //正文

                    "header1", //

                    "header2", //

                    "header3", //

                    "header4", //

                    "header5", //

                    "redo", //重做

                    "undo", //撤销

                    "fullScreen", //全屏

                    "bulletedList", //无序列表

                    "numberedList", //有序列表

                    "insertTable", //插入表格

                    "deleteTable", //删除表格

                    "insertTableRow", //插入行

                    "deleteTableRow", //删除行

                    "insertTableCol", //插入列

                    "deleteTableCol", //删除列

                    "tableHeader", //表头

                    "tableFullWidth", //宽度自适应

                    "insertVideo", //插入视频

                    "deleteVideo", //删除视频

                    "uploadImage", //上传图片

                    "codeSelectLang", // 语言

                ],

            }

组合,分界线dome

    toolbarKeys: [
                    "headerSelect", //正文
                    "bold", // 粗体
                    "underline", // 下划线
                    "italic", // 斜体
                    "sub", //下标
                    "sup", // 上标
                    "lineHeight", //行高
                    "|",
                    "color", // 字体颜色
                    "fontSize", // 字体大小
                    "|",
                    "indent", //增加缩进
                    "delIndent", //减少缩进
                    {
                            key: "group-more-style", // 必填,要以 group 开头
                            title: "对齐方式", // 必填
                            // iconSvg: "<svg>....</svg>", // 可选
                            menuKeys: [
                                    "justifyLeft", //左对齐
                                    "justifyRight", //有对齐
                                    "justifyCenter", //居中对齐
                                    "justifyJustify", //两端对齐],
                            ], // 下级菜单 key ,必填
                    },
                    "|",
                    "bulletedList", //无序列表
                    "numberedList", //有序列表
                    "|",
                    "redo", //重做
                    "undo", //撤销
                    "clearStyle", // 清除样式
                    "fullScreen", //全屏
            ],
    

展示

image.png