Design

Hyperlinks

How to include hyperlinks in your report?
ENTERPRISE FEATURE Available for:
Carbone Cloud
Carbone On-premise
Embedded Carbone JS
  v3.0+ 

Hyperlinks can be applied dynamically to elements (text, images, tables, lists) in DOCX, ODT, ODS, and XLSX documents.

Important Notes:

Before injecting hyperlinks dynamically into reports, Carbone verifies if the URL has a valid format.

A valid URL should contain:

If the URL does not meet these criteria, the link is replaced with: https://carbone.io/documentation.html#hyperlink-validation

:defaultURL(url)

If a dynamic hyperlink or an HTML anchor tag is injected into a report and the URL verification fails, the :defaultURL formatter can be used to replace the default error URL. If the provided URL isn’t valid, it will be replaced with https://carbone.io/documentation.html#hyperlink-validation.

When inserting dynamic hyperlinks, chain the :defaultURL formatter to the tag, like this:

{d.url:defaultURL('https://carbone.io')}

It is possible to pass another tag as an argument:

{d.url:defaultURL(.urlOnError)}

When using the :html formatter, the :defaultURL should be placed before:

{d.content:defaultURL(.urlOnError):html}