Hello, I want to create a macro to list and insert selected image from my server into confluence page. I can do some Java coding, especially with examples provided, but currently I stuck looking for right examples.
My questions are:
- How do I remove left panel in macro dialog?
- Can I make dialog content an iframe?
- How do I insert selected image (considering image and "Insert" button are just HTML inside dialog)?
Thanks for help in advance.
Hi Zak,
thanks for your reply, I'll check this.
Hi Сергей!
I understand you'd like to create a user macro that lets users select from a group of images and insert it onto a Confluence page.
To answer your specific questions:
I created this quick user macro that lets a user choose from a list of image files and show the image on the page. You can replace the imgur address with a path to your server, and the file names with actual files, and you will have a list of files to insert in a macro in Confluence:
## Macro title: Remote image list
## Macro has a body: N
## Body processing: No macro body
## @param filename:title=Image|type=enum|enumValues=LRoLTlK.jpg,4AiXzf8.jpg,Xc1QTk8.jpg
<img src="https://i.imgur.com/$paramfilename">
More helpful examples can be seen at the bottom of Writing User Macros and User Macro Template Syntax.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.