I tried using it in handlers, but I keep getting the error: "Cannot call Quill instance before it's defined." If I use a Vue data variable to store the new Quill instance, I get an error about "offset" mismatch. Who has successfully implemented this? Please share your code!
const quill = new Quill(this.$refs['rich-text-editor'], { modules: { toolbar: { container: this.editorOptions, handlers: { undo: function () { quill.history.undo(); }, redo: function () { quill.history.redo(); } } }, history: { delay: 2000, maxStack: 500, userOnly: true } }, theme: 'snow' });
Below are the imported icons for undo and redo:
.ql-icon[value='undo']::before { content: url('./undo.svg') !important; display: inline-block !important; width: 18px !important; height: 18px !important; } .ql-icon[value='redo']::before { content: url('./redo.svg') !important; display: inline-block !important; width: 18px !important; height: 18px !important; }
I tried using it in handlers, but I keep getting the error: "Cannot call Quill instance before it's defined." If I use a Vue data variable to store the new Quill instance, I get an error about "offset" mismatch. Who has successfully implemented this? Please share your code!
const quill = new Quill(this.$refs['rich-text-editor'], { modules: { toolbar: { container: this.editorOptions, handlers: { undo: function () { quill.history.undo(); }, redo: function () { quill.history.redo(); } } }, history: { delay: 2000, maxStack: 500, userOnly: true } }, theme: 'snow' });Below are the imported icons for undo and redo:
.ql-icon[value='undo']::before { content: url('./undo.svg') !important; display: inline-block !important; width: 18px !important; height: 18px !important; } .ql-icon[value='redo']::before { content: url('./redo.svg') !important; display: inline-block !important; width: 18px !important; height: 18px !important; }