Links
Attach a clickable target to a text span in any text element (p, th, td, li, h1–h6). The span becomes a clickable link in both PDF and DOCX output, drawn blue (#1d4ed8) and underlined unless you give it another color or decoration.
External hyperlink
[link, URL] opens a URL in the user's browser when clicked.
{ "p": "Visit [link, https://example.com]our website[/link] for details." }
Example: email link
{ "p": "Contact us at [link, mailto:support@meridian.com]support@meridian.com[/link]" }
Example: styled link in a footer
{ "p": "[fontsize, 8][link, https://meridian.com/privacy]Privacy Policy[/link][/fontsize]" }
The URL must be an absolute http, https or mailto URL. Any other scheme (tel:, javascript:, file: …) is reported and the text stays plain, with no link.
Internal navigation
[goto, id] jumps to the block whose "id" is id, within the same document. Give the target block an "id" (no spaces), then name it in the tag:
{
"content": [
{ "p": "Jump to [goto, introduction]the introduction[/goto] or to the [goto, appendix]appendix[/goto]." },
{ "h2": "Introduction", "id": "introduction" },
{ "h2": "Appendix", "id": "appendix" }
]
}
The id must match a block that exists in the document. When no block carries it, the render reports a WARNING naming the id, and the text is not a link. An id with a space in it is an ERROR, since no block can carry one. A target pinned to the page with position: fixed is not in the flow: the link opens the page it stands on, with a WARNING.
Combining with formatting
Link and goto compose with typography and color tags to create styled clickable text; a color tag gives the link another color than the default blue:
{ "p": "[link, https://docs.example.com][b]API Documentation[/b][/link]" }
{ "p": "Read the [link, https://example.com/terms][color, #374151]terms of service[/color][/link] before proceeding." }
A link comes underlined, as a browser underlines one. Put it inside a [span, style] whose style states textDecoration and the span's decoration replaces the link's: none gives a link without an underline, in the span's colour if the style states one. A line drawn from outside the span, such as [u] around it, stays.
{
"styles": {
"venue": { "color": "#7A2E1D", "textDecoration": "none" }
},
"content": [
{ "p": "[span, venue][link, https://meridian-gallery.example/visit]Meridian Gallery, East Wing[/link][/span]" }
]
}
Output format
[link] and [goto] are clickable in both outputs. In the PDF they are link annotations; in DOCX [link] is a hyperlink and [goto] a hyperlink to a bookmark named by the target block's id.