I looked a bit more, and I think the information in my last post is quite out of date.
There is one other option documented here: https://developer.atlassian.com/server/confluence/adding-an-option-to-the-editor-insert-menu/
Basically, you create a css resource which loads the icon into the correct place:
(in this example css is located in ‘src/main/resources/css/editor.css’)
#insert-menu macro-marvel .icon {
background: transparent url("mavel.png") 0 0 no-repeat;
margin-top: 0px;
}
you will also have to change the web item link to:
<link linkId="marvel"/>
and add the css file to your web resource in the editor context e.g
<web-resource key="editorWebResource" name="Editor Web Resource">
<context>editor</context>
<resource type="download" name="editor.css" location="${project.artifactId}/css/editor.css"/>
<!-- add any other web resources for the editor here -->
</web-resource>
I know its a lot for a little icon! but apparently that is the way to do it.
P.s here it is working for me
Screenshot%20from%202019-11-05%2022-59-50|271x193