Open igasparetto opened 5 years ago
Ok, so what seems to be the issue?
Sorry, I should have been more descriptive.
I am trying to add a button myCustomButton
that will open a modal. From what I understood and following the example above, one way to bind an event to the button is through handlers.
I assume handlers should go somewhere in the config object below, but where? The toolbar is an array of buttons. I am confused.
Would be good to add handlers to the docs as well...
return {
content: {
ops: [],
},
config: {
readOnly: false,
modules: {
toolbar: [
....
['myCustomButton' ],
....
]
}
}
}
}
Thanks
I have built a codepen to illustrate how you can pass the toolbar config as an object and add handlers that way. You should be able to use this idea in the config prop on the vue-quill wrapper component.
I need to implement something similar to what is described here: https://github.com/zenoamaro/react-quill/issues/111
https://codepen.io/alexkrolick/pen/gmroPj?editors=0010