I am using QuillJS v2.0.0-dev.4 and I am trying to condense the toolbar. In other words, I would like to group several default actions under one dropdown. Here is the screenshot of what I am trying to achieve.
When an option is selected in the dropdown, this custom method gets called
Dropdown.onSelect = (label, value, quill) => {
switch(true){
case /^h1$/.test(value):
//some code needed
break;
case /^h2$/.test(value): break;
case /^h5$/.test(value): break;
}
};
Does anyone know how to trigger the default H1
action?
Just in case someone else needs this, here is the anwer
quill.format('header','h1');