配置字体

编辑器的字体,可以通过 editor.config.fontNames 配置。

const E = window.wangEditor
const editor = new E('#div1')

// 配置字体
editor.config.fontNames = [
    '黑体',
    '仿宋',
    '楷体',
    '标楷体',
    '华文仿宋',
    '华文楷体',
    '宋体',
    '微软雅黑',
    'Arial',
    'Tahoma',
    'Verdana',
    'Times New Roman',
    'Courier New',
]

editor.create()
Copyright © wangEditor (2020 - present) all right reserved,powered by GitbookFile Modify: 2020-10-21 16:30:01

results matching ""

    No results matching ""