最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - ReactQuill - How to style placeholder attribute? - Stack Overflow

programmeradmin4浏览0评论

I want to style the text assigned to the placeholder attribute and make its font size larger. How do I do this with ReactQuill?

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

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

          }}/> 

I want to style the text assigned to the placeholder attribute and make its font size larger. How do I do this with ReactQuill?

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

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

          }}/> 
Share Improve this question asked Dec 13, 2019 at 1:55 WilliamWilliam 4,58818 gold badges66 silver badges117 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 14

You can edit editor's styles using custom CSS. Add this to your index.css file or if you are using any CSS framework like styled-ponents, write this CSS there.

.quill > .ql-container > .ql-editor.ql-blank::before{
    font-size: 20px;
    color: red;
}
发布评论

评论列表(0)

  1. 暂无评论