quill editor toolbar dropdown not showing

85 Views Asked by At

Here is the confiq for the react-quill editor.

const toolbarOptions = [
   [{ 'size': ['small', false, 'large', 'huge'] }],
  [{ 'header': 1 }, { 'header': 2 }],
  ['bold', 'italic', 'underline', 'strike'],
  [{ 'list': 'ordered'}, { 'list': 'bullet' }],
  ["blockquote", "code-block"],
  ['link','image'],
  ["clean"]
];
function Editor() {
  const [editorContent, setEditorContent] = useState('');
  
  return (
    <div className="container">
      <ReactQuill 
        theme="snow"
        value={editorContent} 
        onChange={setEditorContent}  
        modules={{ toolbar: toolbarOptions }}
        scrollingContainer= '#scrolling-container'
      />
    
    </div>
  );
}

The issue here is there should be a dropdown when I click the "size" button. But no dropdown showing up when I clicked it. I look into my dev tool, I see there is a dropdown element (id=ql-picker-options) created. enter image description here

enter image description here

No CSS on the quill editor was changed.

I tried removing the "size" array and call them individually.

[{ 'size': 'small'}, {size: false}, {size: 'large'}, {size:'huge'} ]

Here are the results. enter image description here

enter image description here

0

There are 0 best solutions below