Skip to content

Commit

Permalink
Add rich text example to docs (#1681)
Browse files Browse the repository at this point in the history
  • Loading branch information
ABizzinotto authored Jun 26, 2023
1 parent 48359ea commit c4c7e3f
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,29 @@ Updating components::
existingComponents.append({"name" : component.name})
issue.update(fields={"components": existingComponents})

Working with Rich Text
^^^^^^^^^^^^^^^^^^^^^^

You can use rich text in an issue's description or comment. In order to use rich text, the body
content needs to be formatted using the Atlassian Document Format (ADF)::

jira = JIRA(basic_auth=("email", "API token"))
comment = {
"type": "doc",
"version": 1,
"content": [
{
"type": "codeBlock",
"content": [
{
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.",
"type": "text"
}
]
}
]
}
jira.add_comment("AB-123", comment)

Fields
------
Expand Down

0 comments on commit c4c7e3f

Please sign in to comment.