> For the complete documentation index, see [llms.txt](https://support.docstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.docstudio.com/user/template-builder/template-editor/how-to-add-and-manage-links-in-a-template.md).

# ​How to Add and Manage Links in a Template

This document explains how to insert, edit, copy, and remove hyperlinks in structured documents.

Use links in structured documents to open external pages from text in the document.

### Insert a new link

Use this flow to insert a new link at the cursor position.

{% columns %}
{% column %}

1. Place the cursor where you want the link.
2. Click the **Link** <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FkvzxgagD5storqBjEpGW%2Fimage.png?alt=media&amp;token=3fbf28dc-3d71-4048-ab65-38fea741d3cb" alt="" data-size="line"> icon.
3. In the modal, enter the target URL.
4. Enter the link text if you want to display custom text in the document.

The link is inserted at the cursor position.
{% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FVE2wiuCUkLew0OsITRDS%2Fimage.png?alt=media&amp;token=0575fa39-70af-4fec-9975-9d4e4eca8a0c" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Add a link to selected text

Use this flow to turn existing static text into a hyperlink.

1. Select static text in the document.
2. Click the **Link** <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FkvzxgagD5storqBjEpGW%2Fimage.png?alt=media&amp;token=3fbf28dc-3d71-4048-ab65-38fea741d3cb" alt="" data-size="line"> icon.
3. Enter the target URL in the modal.

The selected text becomes a hyperlink.

{% hint style="warning" %}
Select only static text. If the selection includes dynamic fields, DocStudio removes those fields from the document.
{% endhint %}

### Edit, copy, or remove an existing link

1. Click the existing link.
2. Click the **Edit** <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FGamo1uBdBPCSSfb2CVCV%2Fimage.png?alt=media&amp;token=eadc4747-583d-4de2-b1e2-c6c78417f901" alt="" data-size="line"> icon.
3. Edit the target URL if needed.
4. Use the available actions to copy or remove the link.

When you remove a link, DocStudio removes only the hyperlink. The text stays in the document.

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FcwDH0RqmWlFQDQBxyCRO%2Fimage.png?alt=media&amp;token=dc8fee89-e758-4ae9-9868-59e4432edca2" alt=""><figcaption></figcaption></figure>

### Related topics

* [How to Create a Structured Template](/user/template-builder/template-editor/how-to-create-a-structured-template.md)
* [How to Add or Edit Images in a Template](/user/template-builder/template-editor/how-to-add-or-edit-images-in-a-template.md)
* [How to Add and Manage Static Tables](/user/template-builder/template-editor/how-to-add-and-manage-static-tables.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://support.docstudio.com/user/template-builder/template-editor/how-to-add-and-manage-links-in-a-template.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
