The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
hi @Nico n,
Try below code and let me know whether this helps ☺️
## Developed by: Alana Fernando
## Date created: 19/04/2018
##Shared with love...
<div>
<p class="txtAlgn">
$ {body}
</p>
</div>
<style>
.txtAlgn{
text-align :justify;
}
</style>
Select Rendered as macro body processing.
Here is a much more improved version of above code.
## @param alignment:title=Text alignment|type=enum|desc=Choose Text alignment.|enumValues=Right,Left,Center,Justify
#if ($paramalignment == "Right")
<style>
.txtAlgn{
text-align :right;
}
</style>
#elseif ($paramalignment == "Left")
<style>
.txtAlgn{
text-align :left;
}
</style>
#elseif ($paramalignment == "Center")
<style>
.txtAlgn{
text-align :center;
}
</style>
#elseif ($paramalignment == "Justify")
<style>
.txtAlgn{
text-align :justify;
}
</style>
#end
<div>
<p class="txtAlgn">
$body
</p>
</div>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Many thanks Alana, very useful! :)
I have tried both with some text. They partially works, so that if I write only a paragraph then it is correctly justified, otherwise if I write two or more paragraphs, then it doesn't justify text anymore.
For example see:
https://doc.helab.nuvolaitaliana.it/display/AEE/prova+condivisione+2
Anyway this macro is very useful and I appreciated a lot. Thanks :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nico n try below change in above code. it should surely solve this issue.
<div class= "txtAlgn">
<p>
$body
</p>
</div>
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.
Hi Nico,
Adaptavist has created a server-version app that has this macro included:
If you're trying to do this on Cloud, I don't think it's possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Meg, I know about this plugin but it is not free. I need to write a user macro (very simple) only to justify text.
thank you anyway
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've found only that you can do this with the HTML macro utilizing justify code.
Obviously it's possible since Adaptavist has figured it out, but I'm not able to assist with that.
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.
Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.