Hello,
I would like to write a user macro very simple in order to justify text. How I can do ?
thanks in advance
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.
Hi Nico,
Adaptavist has created a server-version app that has this macro included:
Content Formatting Macros
If you're trying to do this on Cloud, I don't think it's possible.
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
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.
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>
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
thanks anyway
@Nico n try below change in above code. it should surely solve this issue.
<div class= "txtAlgn"><p> $body</p></div>
It looks like you're new here. Sign in or register to get started.