wangEditor icon indicating copy to clipboard operation
wangEditor copied to clipboard

添加新字体无效

Open jack20211101 opened this issue 1 year ago • 1 comments

问题描述

editor.config.fontNames 无效,按照文档配置

wangEditor 版本

5.1.23

是否查阅了文档 ?

最小成本的复现步骤

image

jack20211101 avatar Mar 07 '24 03:03 jack20211101

@jack20211101 这是文档中添加字体的链接菜单配置字体 以下是配置字体的可行方式

const editorConfig = {
    placeholder: "请输入内容...",
    MENU_CONF: {
      fontFamily: {
        fontFamilyList: [
          // 元素支持两种形式
          //   1. 字符串;
          //   2. { name: 'xxx', value: 'xxx' }
          "黑体",
          "楷体",
          { name: "仿宋", value: "仿宋" },
          "Arial",
          "Tahoma",
          "Verdana",
        ],
      },
    },
  };

cycleccc avatar Mar 08 '24 06:03 cycleccc