Dealing with Rich Text in Cloud
Up until version 3.0.16 Power Scripts knew only to set very simple text.
The document format (ADF) that governs the Atlassian rich text is fairly complex therefore we decided to present you with a simpler form of entering text in description & environment standard fields, comments, worklog comments, or any other rich text fields you may configure in your Jira and have internally an ADF representation associated with them.
Important!
Note that the standard custom fields provided by Atlassian and named Text Field (single line), Text Field (read only) are NOT ADF fields.
The below syntax should work on custom fields of type Text Field (multi-line) and all the above-mentioned fields and comments.
Paragraphs and Basic Decorations
A paragraph is any text that ends in a \n
. Within the paragraph, you are allowed to add decorations to your text:
This is a very simple paragraph.
This is another paragraph containing text in **bold** , //italics//, ~~strike through~~ and __underline__.
This is another paragraph containing {{color: #2266AA}} colored text{{/color}}.
And another paragraph containing emojis: {{emoji}}🙂||:slight_smile:||1f642{{/emoji}}
Mentioning somebody need to follow this syntax {{mention}}@Radu Dumitriu||6093b81a539c14006ad3c137{{/mention}}
Let's not forget subscript--text-- and SuperScript^^text^^.
Links syntax: [[https://google.com||Google]].
There’s a lot going on here, so let’s summarize:
Decoration | Text | Obs |
---|---|---|
bold text |
|
|
italics |
|
|
strike through |
|
|
underline |
|
|
superscript |
|
|