Design

Hyperlinks

A Step-by-Step Guide to Embedding Hyperlinks in Your Documents
ENTERPRISE FEATURE Available for:
Carbone Cloud
Carbone On-premise
Embedded Carbone JS
  v3.0+ 

With Carbone, you can seamlessly integrate hyperlinks into various elements of your DOCX, XLSX, PPTX, ODT, ODS, ODP, and ODG templates.

Hyperlinks can be dynamically applied to various elements such as text, images, tables, and lists within your documents. Follow these steps to insert hyperlinks:

  1. Select the Element: Right-click on the text, image, table, or list item you want to hyperlink.
  2. Insert Hyperlink: Choose the "Hyperlink" option from the context menu.
  3. Enter the Carbone Tag: Input the appropriate Carbone tag and confirm your selection.

Important Notes:

Before dynamically injecting hyperlinks into your reports, Carbone performs a validation check to ensure the URL format is correct. A valid URL must include:

If the URL fails to meet these criteria, it will be replaced with the default URL: https://carbone.io/documentation.html#hyperlink-validation

:defaultURL(url)

If a dynamic hyperlink or an HTML anchor tag fails the URL verification, you can use the :defaultURL formatter to specify a fallback URL. This ensures that invalid URLs are replaced with a valid alternative.

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 dynamic argument:

{d.url:defaultURL(.urlOnError)}

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

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