gtgalone / react-quilljs

React Hook Wrapper for Quill, powerful rich text editor.
https://www.npmjs.com/package/react-quilljs
MIT License
248 stars 28 forks source link

How can I add a custom toolbar with a custom dropdown? #29

Closed shamoons closed 3 years ago

shamoons commented 3 years ago

I saw https://github.com/gtgalone/react-quilljs/issues/6

But I am trying to add a dropdown that's a non-standard element.

I have:

<div id="toolbar">
                    <select className="ql-header">
                        <option value="1" style={{ fontSize: '2em' }}>Heading 1</option>
                        <option value="2">Heading 2</option>
                        <option selected />
                    </select>
                    <button className="ql-bold" />
                    <button className="ql-script" value="sub" />
                    <button className="ql-script" value="super" />
                    <select className="ql-num-predictions">
                        <option value="1" >One</option>
                        <option value="2">Two</option>
                        <option value="3">Three</option>
                    </select>
                </div>

The ql-header one is fine. But the ql-num-predictions doesn't populate.

gtgalone commented 3 years ago

@shamoons Thank you for using.

Maybe there is something problem with ql-num-predictions plugin.

You should figure it out :)