Nuxt 3 + Quill Editor: quill:toolbar Container required for toolbar

Viewed 36

Someone, please help me, for more than 3 hours I am stuck with this problem, I tried using Nuxt 3 and quill editor with the customized toolbar, here is the code

html

<client-only>
   <QuillEditor
      theme="snow"
      ref="quill"
      contentType="html"
      :options="editorOption"
      toolbar="#toolbar"
      v-model:content="forms.content"
   />
</client-only>

js

data(){
   return {
     editorOption: {
        theme: "snow",
        placeholder: "Write something...",
        modules: {
          toolbar: "#toolbar"
        },
     },
   }
}

THE ERROR

quill:toolbar Container required for toolbar 

{
    "container": "#toolbar",
    "handlers": {}
}

[Vue warn]: Unhandled error during execution of mounted hook 
  at <QuillEditor theme="snow" ref="quill" contentType="html"
1 Answers

Vue Quill is expecting you to define your custom toolbar. That error happens when you define a custom toolbar selector '#toolbar' but don't actually put the toolbar anywhere (it is looking for an element with an id of "toolbar").

Related