quill - QuillJS Reload toolbar controls -
i using quilljs , need add controls toolbar during runtime. there way make code after whole quill has been initialized?
this how make now.
quilleditor.getmodule('toolbar').addhandler('color', (value) => { if (value == 'new-color') { value = prompt('give me hex color baby!'); // unfortunately code not work let n = toolbar.queryselector('select.ql-color'); n.innerhtml += '<option value="'+value+'"></option>'; } quilleditor.format('color', value); console.log("color handler", value); });
Comments
Post a Comment