I would like to make a custom toolbar for my quill editor. Therefore I would like to add another button to the toolbar. I have tried several methods but it doesn’t work. Please help me with an idea.
What i have in component.html:
<quill-editor (styles)="{height: '200px'}" (modules)="editorModules" (onEditorChanged) = "changedEditor($event)"></quill-editor>
And here is what i have in component.ts:
editorText=”;
editorModules = {
toolbar: (
('bold', 'italic', 'underline'),
({align:''}, {align:'center'}, {align:'right'}, {align: 'justify'}),
({'indent': '-1'},{'indent': '+1'} ),
({'size' : ('small', false, 'large', 'huge')}),
('color'),
('link'),
({'list': 'bullet'}, {'list': 'ordered'}),
('image')
)
}
changedEditor(event: EditorChangeContent | EditorChangeSelection) {
console.log('editor got changed');
this.editorText = event('editor')('root');
}
Here is a photo of my current Text Editor:
Text Editor
I would very much appreciate if you would try to help me, thank you.