【问题标题】:React-rte Rich Text Editor change button colorsReact-rte 富文本编辑器更改按钮颜色
【发布时间】:2021-06-23 07:25:51
【问题描述】:

我无法更改工具栏按钮的背景颜色。请参考图片链接。目前按钮为浅灰色。

图片链接

image link

我的代码

 <div className="input-field">
                            <label id="together" className="borderline">Create Post</label>
                            <RichTextEditor
                                className="text-editor"
                                editorClassName="class-editor"
                                toolbarClassName= "tool-editor"
                                
                                toolbarConfig={toolbarConfig}
                                value={this.state.content}
                                onChange={this.onChange}
                            />
                        </div>

我的 CSS

.text-editor:focus-within{ 

  box-shadow: 0 0px 0 0 orange !important;
  border: 2px solid orange !important;


}


div.input-field:focus-within .tool-editor{

  color: orange !important;
}

我做了什么

我玩过className、editorClassName 和toolbarClassName 的css。但它们似乎都没有改变它的背景颜色。

【问题讨论】:

    标签: css reactjs rich-text-editor rte


    【解决方案1】:

    尝试将样式应用于此类

    .MuiIconButton-root
    

    它将您的样式应用到编辑器的按钮上

    【讨论】:

      猜你喜欢
      • 2021-05-23
      • 1970-01-01
      • 2021-02-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-10
      • 2011-03-14
      相关资源
      最近更新 更多