Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

如何在初始化时,设置一个默认的字体、字号? #242

Closed
wangfupeng1988 opened this issue Oct 30, 2021 · 1 comment
Closed
Labels
question Further information is requested

Comments

@wangfupeng1988
Copy link
Contributor

问题描述

如题,初始化编辑器时,直接设置一个默认字体

wangEditor 版本

v5

是否查阅了文档 ?

(文档链接 doc.wangEditor.com

@wangfupeng1988 wangfupeng1988 added the question Further information is requested label Oct 30, 2021
@wangfupeng1988
Copy link
Contributor Author

wangfupeng1988 commented Oct 30, 2021

可以在初始化传入 content 时设置默认字体

    const editor = E.createEditor({
      selector: '#editor-text-area',
      content: [
        {
          type: 'paragraph',
          children: [
            { text: '', fontFamily: '黑体', fontSize: '32px' }
          ]
        },
      ],
      config: editorConfig
    })

@wangfupeng1988 wangfupeng1988 pinned this issue Nov 8, 2021
@wangfupeng1988 wangfupeng1988 changed the title 如何在初始化时,设置一个默认的字体? 如何在初始化时,设置一个默认的字体、字号? Feb 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant