Configuring html content for macro panel button in atlassian-plugin.xml

I am looking to develop a customized button in the macro panel, where to insert more than just a label and icon.

Is it any way of mentioning the html content of the button in atlassian-plugin.xml?

<xhtml-macro name="myMacro" class="com.learning.MyMacro" key="my-macro">
    <category name="formatting"/>
        <button id="myMacro-custom-button"/>

Take a look at this atlassian-plugin.xml

…with the following xhtml-macro:

	<xhtml-macro name="box" class="com.example.plugin.confluence.BoxMacro"
		<!-- Additional option buttons in editor between 'edit' and 'remove' -->
			<spacer />
			<button id="Small" label="S" />
			<button id="Medium" label="M" />
			<button id="Large" label="L" />
			<spacer />

Also this web-resource which adds the functionality, using JavaScript:

	<web-resource name="Resources - handle macros with JS"
		<description>Macro related JS resources</description>
		<!-- JS to set properties S,M,L on box macro -->
		<resource type="download" name="editor-box.js" location="js/editor-box.js" />

And the corresponding JavaScript.

Set this all up, then you can use JavaScript to override the label on the button(s). If you need to reference the page content, try the relevant REST API.