Atlassian Document Format (ADF) helpers.
Jira Cloud v3 takes and returns rich text as ADF — a nested JSON document tree, not a string. Two directions live here:
adf->text : best-effort flatten an ADF value to compact plain text for
reading (lossy: tables/media/mentions collapse to text).doc / text->adf / paragraph : build minimal valid ADF documents for
write paths (create issue description, add comment, etc.).Full-fidelity ADF is always reachable by passing your own document map to the endpoint functions; these helpers just cover the common cases.
Atlassian Document Format (ADF) helpers.
Jira Cloud v3 takes and returns rich text as ADF — a nested JSON document
tree, not a string. Two directions live here:
- `adf->text` : best-effort flatten an ADF value to compact plain text for
reading (lossy: tables/media/mentions collapse to text).
- `doc` / `text->adf` / `paragraph` : build minimal valid ADF documents for
write paths (create issue description, add comment, etc.).
Full-fidelity ADF is always reachable by passing your own document map to the
endpoint functions; these helpers just cover the common cases.(adf->text v)Best-effort flattening of an ADF value to compact plain text. Accepts a string (returned as-is), an ADF map, or nil. Lossy by design: tables, media, mentions, and panels collapse to their text content.
Best-effort flattening of an ADF value to compact plain text. Accepts a string (returned as-is), an ADF map, or nil. Lossy by design: tables, media, mentions, and panels collapse to their text content.
(doc & blocks)Wrap ADF block nodes in a top-level ADF document. Pass block-node maps (e.g.
(paragraph ...)); a lone string is treated as a single paragraph.
Wrap ADF block nodes in a top-level ADF document. Pass block-node maps (e.g. `(paragraph ...)`); a lone string is treated as a single paragraph.
(paragraph s)An ADF paragraph node wrapping a single run of plain text.
An ADF paragraph node wrapping a single run of plain text.
(text->adf s)Build a minimal valid ADF document from a plain string, splitting on blank lines into paragraphs. Convenience for the common 'I just want to write some text' case on create-issue / add-comment.
Build a minimal valid ADF document from a plain string, splitting on blank lines into paragraphs. Convenience for the common 'I just want to write some text' case on create-issue / add-comment.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |