Custom Buttons
Below is the basic JS for creating a custom button and register it to the editor.
editor.registerButton({
label: 'blue',
tag: 'span',
className: 'blue',
group: 'mark'
});
If you want to make button groups from the scratch...
const btnOptions = [
{
label: '<i class="fa fa-link"></i>',
tag: 'a',
className: '',
group: 'mark'
},
{
label: '<i class="fa fa-bold"></i>',
tag: 'strong',
className: '',
group: 'mark'
},
{
label: '<i class="fa fa-italic"></i>',
tag: 'i',
className: '',
group: 'mark'
},
{
label: 'red',
tag: 'span',
className: 'red',
group: 'mark'
}
];
const editor = new LiteEditor('.js-editor', {
btnOptions
});