如何在 jodit-react

问题描述

我正在使用 jodit-react 编辑器。老实说,文档有点混乱。这是我当前向 WSYIWYG 编辑器添加自定义样式的配置,但我无法更改工具栏的背景颜色和文本颜色

const config = {
        readonly: false,// all options from https://xdsoft.net/jodit/doc/
        height: '450px',width: '100%',enableDragAndDropFiletoEditor: true,buttons: [
            'source','|','bold','italic','underline','ul','ol','font','fontsize','brush','paragraph','image','table','link','left','center','right','justify','undo','redo','hr','eraser','fullsize',],uploader: { insertimageAsBase64URI: true },removeButtons: ['brush','file'],showXPathInStatusbar: false,showCharsCounter: false,showWordsCounter: false,toolbaradaptive: true,toolbarSticky: true,style: {
            background: '#27272E',color: 'rgba(255,255,0.5)',},};

解决方法

我相信,你可以检查一下

工具栏https://xdsoft.net/jodit/doc/options/toolbar/

类型: [布尔值 |字符串 | HTMLElement]。