I am using the Redactor editor as part of Perch. I would like to give the editor the ability to (optionally) add the class of "button" to any <a> tag they add. This could be via an additional option in the existing Add a Link modal, or could be a separate button in the editor toolbar.
Does anyone have any guidance as to the best way to achieve this? Any pointers appreciated.
This is my current config setup:
config.plugins = [];
config.buttons = ['format','bold','italic','deleted','link','lists'];
config.formatting = ['p', 'blockquote', 'h2', 'h3', 'h4'];

You can use
formattingAddto create a custom set of formatting options for Formatting dropdown. This will allow you to add your own CSS classes.Unfortunately, according to the Official Documentation:
In other words, since
<a>is an inline element (not a block element), if you are trying to create an option using built-in Redactor functionality, then it appears you are out of luck.