2

我想为分配给占位符属性的文本设置样式并使其字体大小更大。我如何使用 ReactQuill 做到这一点?

          <ReactQuill placeholder= "some fun text" onChange = {onContentChange} value={contentValue} theme="snow" style={{

            height:"300px",
            padding:"20px",
            lineHeight:"0px",

          }}/> 
4

1 回答 1

4

您可以使用自定义 CSS 编辑编辑器的样式。将此添加到您的index.css文件中,或者如果您使用任何 CSS 框架,如styled-components,请在此处编写此 CSS。

.quill > .ql-container > .ql-editor.ql-blank::before{
    font-size: 20px;
    color: red;
}
于 2020-01-20T13:51:01.393 回答