I am using quill.js to create an editor in my project.Hitherto,i have successfully integrated quill with my web-project.Now what i want to do is create a custom dropdown in the quill toolbar.The dropdown will have following options 1)Email 2)Simple Meeting Description When Email-Option is selected,the editor loads a Email Template etc. Can anyone help me in achieving this....
below is my code
var toolbarOptions=
[
['bold','italic','underline','strike'],
['blockquote','code-block'],
[{ 'header': 1 }, { 'header': 2 }],
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
[{ 'script': 'sub'}, { 'script': 'super' }],
[{ 'indent': '-1'}, { 'indent': '+1' }],
[{ 'direction': 'rtl' }],
[{ 'size': ['small', false, 'large', 'huge'] }],
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
[{ 'color': [] }, { 'background': [] }],
[{ 'font': [] }],
[{ 'align': [] }],
['clean']
];
var quill = new Quill('#editor', {
theme: 'snow',
placeholder: 'Compose an epic message...',
readOnly: false,
modules: {
history: {
delay: 2000,
userOnly: true
},
toolbar: {
container: toolbarOptions,
handlers: {
undo: function(value) {
this.quill.history.undo();
},
redo: function(value) {
this.quill.history.redo();
}
}
}
}
});