---
title: "Wiki Markup, HTML and Links"
canonical: "https://docs.getxray.app/space/XRAYCLOUD/44566586/Wiki+Markup%2C+HTML+and+Links"
format: markdown
---
<details>
<summary>Table of Contents</summary>

> Macro (toc)
</details>

# Fields with Wiki Markup

If the fields to be exported are configured to use a [Wiki Markup Renderer](https://confluence.atlassian.com/display/JIRA/Configuring+Renderers#ConfiguringRenderers-WikiStyleRenderer), you can place the Wiki rendering in the result document. 

**Definition: **`${wiki:<Field name>}`

##### **Sample Code**

```
${wiki:Description}
${wiki:Custom Free Text}
```

> ℹ️ When creating an [Excel Template](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44570603) document, you must use: `${wiki:Description}`

# <span style="color: #000000">Inserting Hyperlinks</span>

The [Document Generator](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44565169) also allows for generating hyperlinks on the fly.

**Definition: **`@{title=<Link Title>|href=<Link Address>}`

##### **Generate a link named with Issue key, linking to the Issue address on the Jira Server**

```
@{title=${Key}|href=${BaseURL}/browse/${Key}}
```

> ℹ️ When creating an Excel Template document, you must use: `${link:title=${Key},href=${BaseURL}/browse/${Key}}`

# Fields with HTML

If the fields to be exported are configured to use an HTML renderer, such as the one provided by the [JEditor plugin](https://marketplace.atlassian.com/plugins/com.jiraeditor.jeditor), you can place the HTML rendering in the result document. 

**Definition: **`${html:<Field name>}`

##### **Sample Code**

```
${html:Description}
${html:Custom Free Text}
```

> ℹ️ When creating an Excel Template document, you must use: `${html:Description}`

> ❌ If the document's output format is HTML, you must use: `${wiki:Description}`** **instead.

# JavaScript with Wiki or HTML

The Document Generator allows applying Wiki or HTML functions in the text rendered based on JavaScript. For example, if the fields to be exported are configured to use the <span style="color: #222222">**Default Text Renderer**</span><span style="color: #222222"> provided by Jira, you can use JavaScript to format the field using the notation explained </span><span style="color: #222222">[here](https://docs.getxporter.app/space/XPORTER/1413883/JavaScript)</span><span style="color: #222222"> and then apply the Wiki or HTML functions. </span>

<span style="color: #222222">You can also use JavaScript to format fields that are configured to use the </span><span style="color: #222222">[Wiki Markup Renderer](https://confluence.atlassian.com/display/JIRA/Configuring+Renderers#ConfiguringRenderers-WikiStyleRenderer)</span><span style="color: #222222"> or an HTML renderer, such as the one provided by the</span><span style="color: #222222">[ JEditor plugin](https://marketplace.atlassian.com/plugins/com.jiraeditor.jeditor)</span><span style="color: #222222">, and then apply the Wiki or HTML functions. To achieve that, the JavaScript function must be defined as a field in the Template and the function to be applied to that field. </span>

<span style="color: #222222"> </span><span style="color: #222222">**Definition: **</span>`${wiki:%{<Javascript>}`} or `${html:%{<Javascript>}} `

##### **Formatting the first word in field "Description" to "Bold", "Italic" or to have a different text color (red in the examples) using HTML function**

```
${html:%{var t ='<b>'+'${Description}'.split(' ')[0] +'</b>'+'${Description}'.substr('${Description}'.indexOf(' ') + 1);t.toString();}}
${html:%{var t ='<i>'+'${Description}'.split(' ')[0] +'</i>'+'${Description}'.substr('${Description}'.indexOf(' ') + 1);t.toString();}} 
${html:%{var t ='<b>'+'<font color="Red">'+'${Description}'.split(' ')[0] +'</b>'+'</font>'+'${Description}'.substr('${Description}'.indexOf(' ') + 1);t.toString();}}
```

##### **Formatting the first word in field "Description" to "Bold", "Italic" or to have a different text color (red in the examples) using Wiki function**

```
${wiki:%{var t ='*'+'${Description}'.split(' ')[0] +'*'+' ${Description}'.substr('${Description}'.indexOf(' ') + 1);t.toString();}}
${wiki:%{var t ='_'+'${Description}'.split(' ')[0] +'_'+' ${Description}'.substr('${Description}'.indexOf(' ') + 1);t.toString();}}
${wiki:%{var t ='{color:red}'+'${Description}'.split(' ')[0] +'{color}'+' ${Description}'.substr('${Description}'.indexOf(' ') + 1);t.toString();}}
```


<details>
<summary>Support/Troubleshooting</summary>

If you have questions or technical issues, please [contact the Support team via the Customer Portal (Jira service management)](https://jira.getxray.app/servicedesk/customer/portal/2/user/login?destination=portal%2F2%2Fcreate%2F28) or [send us a message using the in-app chat](https://getxraydocs.atlassian.net/wiki/spaces/XRAYCLOUD/pages/44577312).
</details>