How to add custom buttons on Macro property panel in Confluence Cloud

How to add custom buttons on Macro property panel in Confluence Cloud?
I do not see any documentation and example of adding custom button or text box on Property Panel (which pops out on click of macro) of a macro.
My use case is simple: Before saving the body of the macro I want to check the grammar of the macro content and I will use one of the button on the property panel to send my data for grammar validation and accordingly respond to user correct or incorrect as response.
Please help me on this and provide link if you have already implemented something similar.

Thank you!