Currently, I am exploring a method to include a custom class when the user selects the blockquote toolbar button. When the blockquote is clicked, it generates the following element:
<blockquote class="ql-align-justify">this is my quoted text</blockquote>
I intend to append .blockquote
to the existing class like this:
<blockquote class="ql-align-justify blockquote">this is my quoted text</blockquote>
My current approach involves adding a handler, although there appears to be limited documentation on how to implement this:
this.editor = new Quill(this.$refs.editor, this.editorOptions)
// Handlers can also be added post initialization
var toolbar = this.editor.getModule('toolbar');
toolbar.addHandler('blockquote', function(value) {
//todo: working on adding the blockquote class to blockquotes.
console.log('blockquote called');
console.log('value:');
console.log(value);
if (value) {
this.quill.format('blockquote');
}
});