问题描述
这就是我试图为两个编辑器设置editorStyle的方式。
<Editor editorState={editor1State}
toolbarClassName="editor1Toolbar"
wrapperClassName="editor1ToolbarWrapper customize"
editorClassName="form-control-sm"
onEditorStateChange={(data) => {
const html = this.onEditor1StateChange(data);
setFieldValue("content_title",html);
}}
toolbar={TOOLBAR_OPTIONS}
editorStyle={{fontSize: 16,fontFamily: "Arial"}}/>
<Editor editorState={editor2State}
toolbarClassName="editor2Toolbar"
wrapperClassName="editor2ToolbarWrapper customize"
editorClassName="form-control-sm"
onEditorStateChange={(data) => {
const html = this.onEditor2StateChange(data);
setFieldValue("content_title",html);
}}
toolbar={TOOLBAR_OPTIONS}
editorStyle={{fontSize: 10,fontFamily: "Verdana"}}/>
,但是editor1的样式也适用于editor2。如果我未对editor1应用任何editorStyle,但editor2具有editorStyle对象,则editor2将丢失其样式对象
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)