We are on Confluence Server 7.2 and we recently started using the "Excerpt" macro more frequently.
When adding a macro to a page, we use the + button, which gives a long list of macros, and the additional option for "Other Macros."
I would like to be able to add the macro "Excerpt" onto the dropdown (potentially replacing one of the others, if necessary), thus removing the need to open the macro browser. Is that possible?
An oft requested feature. The only ways I know of that it can be done are via Javascript or writing your own plugin to add it to the menu, something along the lines of this tutorial:
https://developer.atlassian.com/server/confluence/adding-an-option-to-the-editor-insert-menu/
I have used the later method to add some user macros to the insert menu.
Thank you for the response. That's a great, detailed response that could provide an avenue to our solution.
Reading through the documentation, that looks to be a way to add an icon to the Confluence page editing menu, is that correct?
That may be the only way to achieve the effect we're trying to get, and it will definitely work (based on my reading of the link you provided). I was hoping for a lighter-weight solution to modify the specific macro menu, instead of the editor.
I apologize if I overlooked this capability in the link above (and for asking a repeated question!). Thank you for your time and assistance-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There are limited attach points. You specify them in the web-item module (setcion attribute), for example:
<web-item key="editor-figuretitle" name="Figure Title" section="system.editor.featured.macros.default" weight="13">
<description>Editor Insert menu link.</description>
<label key="editor-figuretitle.label"/>
<link linkId="figure_title"/>
</web-item>
But yes, a feature to be able to promote a macro to the featured list would be great, and has been asked for for years (soon to be 10). ;-) CONFSERVER-23368
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Extraordinary help, thank you. Added my vote and watched that link!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Bailey
I'm also trying to list my macro under Insert menu bar . I tried using your web-item configuration as mentioned in above comments.
My macro is getting added in Insert menu toolbar but it is appearing below symbol macro as mentioned in attached snapshot. I tried to look into inspect option for insert menu toolbar , got to know that it is divided into two section like "content-insert-list" and "macro-insert-list". I want to add my macro at first position like above "Files and Image" macro . Could you please help to tell what value of section i need to pass to achieve this ?
Here is my web-item configuration .
<web-item key="editor-macrolinkkey" name="Name of my Editor Feature" section="system.editor.featured.macros.default" weight="-91">
<label key="Insert Link file"/>
<link linkId="insert-link-file"/>
</web-item>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, the placement is controlled by the weight (what you show is weight -91). For my macros, I used weights 12 and 13 to place them middle of the pack. So experiment with a higher positive number.
BTW, weight is a classic UI parameter for menus.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Bailey
Thanks for looking into it. I tried multiple combination of weight values even with 0 value but I'm not able to move my macro at first position. I want to list my macro at the place before "Files and images" macro is listed .
I also tried weight value as higher positive number but that is placing the macro to end of the pack. But I want to place at in the start of pack .
Thanks
Nishant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you tried a weight of 99?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. I've tried it. But Unfortunately , Using weight value of 99 is going to put my macro at the second last position of the list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.