I'm trying to add alignment buttons to the Quill editor toolbar.
The toolbar documentation isn't very detailed. It shows how to have a select for the alignment options but I'd like a set of toggle buttons side-by-side. Is this possible?
I'm trying to add alignment buttons to the Quill editor toolbar.
The toolbar documentation isn't very detailed. It shows how to have a select for the alignment options but I'd like a set of toggle buttons side-by-side. Is this possible?
You can do align: 'center'
, similar to the header: 3
example in the docs. Here's a working example: https://codepen.io/anon/pen/PKdEgN
var quill = new Quill('#editor-container', {
modules: {
toolbar: [
[{ align: '' }, { align: 'center' }, { align: 'right' }, { align: 'justify' }]
]
},
placeholder: 'Compose an epic...',
theme: 'snow' // or 'bubble'
});