create a macro that produces an editable table/content

I would like a macro that will create in the editor a table that is edited directly without (re)setting the macro parameters. I would like to have behave it more like a template functionality that a 'macro'.

For example: As a user I want to insert a properties table with a page status that is rendered in the editor in the 'body' of the macro and edited directly without setting the parameters. Like the color of the status block.

The following code is what I have so far using parameters. It renders a properties table in a viewable page, but renders just a 'macro' block in the editor and if I need to update the 'status' I need to change the macro parameters.

I would like to know if it is possible to 'set' the $body of the macro to the 'html' included in the macro below the parameters definitions.

## Macro title: Owner and Approved properties table
## Macro has a body: N
## Body processing: -
## Output: -
## Developed by: @jochem.berends
## Date created: 10-06-2013
## Installed by: @jochem.berends

## @param Owner:title=Owner|type=username|required=true|desc=The Owner of this Page
## @param Status:title=Status|type=enum|enumValues=For Reference,In Work,Prepared,Approved,Released|desc=Choose the status of the page|default=In Work
## @param Approval:title=Approval|type=username|desc=Enter the name who need to approve this page
## @param ReleasedBy:title=Released By|type=username|desc=Enter the name who need to release this page
## @param ReleaseDate:title=Release Date|type=date|desc=Enter release date in format dd-mm-YYYY

<ac:macro ac:name="details"><ac:parameter ac:name="label">Status</ac:parameter>
					<th>Page Status</th>
					<td colspan="1"><ac:macro ac:name="status"><ac:parameter ac:name="colour">Green</ac:parameter><ac:parameter ac:name="title">$paramStatus</ac:parameter></ac:macro></td></tr>
					<td colspan="1">
						<p><ac:link><ri:user ri:username="$!paramOwner" /></ac:link></p></td></tr>
					<th colspan="1">Approval By</th>
					<td colspan="1">
								<ac:task-body><ac:link><ri:user ri:username="$!paramApproval" /></ac:link></ac:task-body>
					<th colspan="1">Release By</th>
					<td colspan="1">
								<ac:task-body><ac:link><ri:user ri:username="$!paramReleasedBy" /></ac:link></ac:task-body>
					<th>Issue Number</th>
					<td colspan="1">
					<th colspan="1">Date of Release</th>
					<td colspan="1">$!paramReleaseDate</td>

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Apr 17, 2018 in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

784 views 2 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you