我想设置分配给占位符属性的文本样式并使其字体大小更大。如何使用 ReactQuill 做到这一点?
<ReactQuill placeholder= "some fun text" onChange = {onContentChange} value={contentValue} theme="snow" style={{
height:"300px",
padding:"20px",
lineHeight:"0px",
}}/>
最佳答案
您可以使用自定义 CSS 编辑编辑器的样式。将其添加到您的 index.css
文件中,或者如果您使用任何 CSS 框架(例如 styled-components
),请在其中写入此 CSS。
.quill > .ql-container > .ql-editor.ql-blank::before{
font-size: 20px;
color: red;
}
关于javascript - ReactQuill - 如何设置占位符属性的样式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59315115/