Home/Jira formatting reference
Jira text formatting
File links in Jira: [file:///] in wiki markup and ADF
[file:///c:/temp/foo.txt] links to a file on a local drive or network share. Jira renders it as an ordinary link, and ADF stores it as a link mark with the file: address.
Wiki markup
[file:///c:/temp/foo.txt]
[alias|file:///c:/temp/foo.txt]
Stored as ADF (REST API v3)
The ADF document Jira Cloud stores for [file:///c:/temp/foo.txt]:
{
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "file:///c:/temp/foo.txt",
"marks": [
{
"type": "link",
"attrs": {
"href": "file:///c:/temp/foo.txt"
}
}
]
}
]
}
]
}
Examples
Wiki markup (API v2)
[file:///c:/temp/foo.txt]Point to a file on a local drive for people who share that path.
Rendered by Jira (HTML)
<p><a href="file:///c:/temp/foo.txt" class="external-link" rel="nofollow noreferrer">file:///c:/temp/foo.txt</a></p>Back to wiki after the round trip
[file:///c:/temp/foo.txt|file:///c:/temp/foo.txt]Sent to Jira Cloud on .
Wiki markup (API v2)
[http://jira.atlassian.com]Compare with a web link in the same bracket form.
Rendered by Jira (HTML)
<p><a href="http://jira.atlassian.com" class="external-link" rel="nofollow noreferrer">http://jira.atlassian.com</a></p>Back to wiki after the round trip
[http://jira.atlassian.com|http://jira.atlassian.com]Sent to Jira Cloud on .
Wiki markup (API v2)
[Docs|https://example.com/a-b-c-d]Compare with a link that has an alias.
Rendered by Jira (HTML)
<p><a href="https://example.com/a-b-c-d" class="external-link" rel="nofollow noreferrer">Docs</a></p>Back to wiki after the round trip
[Docs|https://example.com/a-b-c-d]Sent to Jira Cloud on .
What changes in conversion
- The file address is accepted as a link in wiki and stored as a link mark in ADF with the address as text.
- A wiki read of the stored ADF returns [file:///c:/temp/foo.txt|file:///c:/temp/foo.txt], with the address repeated as alias.
Pitfalls
- A file: address points to a path on the reader's own machine, so it only works for people who have the same path.
- Browsers often block links from a web page to file: addresses. Attach the file or use a shared web address.