Question:
I have a custom button added in the toolbar of the editor. How can I set the active (highlighted) state of it?
Answer:
To make a button active inside the toolbar of the WYSIWYG editor, you should add the class fr-active
to it. It is best to do that in the refresh callback of the custom button:
refresh: function ($btn) {
// Make button active.
$btn.addClass('fr-active');
}