William
William

Reputation: 4588

ReactQuill - How to style placeholder attribute?

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",

          }}/> 

Upvotes: 2

Views: 10597

Answers (1)

The Coder
The Coder

Reputation: 4047

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-components, write this CSS there.

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

Upvotes: 14

Related Questions