Often times editors need to create a link, or hyperlink (anchor to the definition of link). A link can take a user to a page within the same site or a different site altogether, or an anchor on the same page as the link. A link can also point to an email address: When clicked, the users email client to will start a new email that will be sent to that address.
To create a link, navigate to the page where you wish to add a link and click the Edit tab, then follow the instructions below depending on the type of link you wish to add:
Link to another web page
- Locate the formatted text field where you wish to add a link (e.g. the Body field); highlight the text that will comprise the link and click the Link button in the toolbar.
- The link dialog will appear beneath the highlighted text; type or paste the URL (web address) you wish to link to in the Link URL field.
- In the event the link should open in a new browser tab, click the Advanced toggle, then enable the Open in new window option.
Note: We recommend only opening links in a new tab when you are linking to a page outside of your website, and to indicate that the link will open a new tab. - Click the green check mark to create the link and close the link dialog.
- Click the Save button at the top of the page to commit the change.
Copying URLs from email
IMPORTANT: When copying a URL (web address) from your Duke email client, please be sure to not use the link as it is in the email. Click on the link in your email, then copy the link from your browser’s address bar. Duke security filters all emailed URLs through a system that analyzes the link for attacks. Do not copy and paste links that begin with urldefense.com, as they will may not work on your website.
Link to an email address
When you add properly formatted email address (e.g. netid@duke.edu) to a formatted text field, this address will be an active mailto link to that address when the page is displayed. However, it is possible make other text (e.g. a person’s name or job title) an active mailto link:
- Highlight the text that will comprise the link (e.g. Director of Graduate Studies) and click the Link button in the toolbar.
- Enter mailto: followed by the email address (e.g. mailto:aaas-dgs@duke.edu) in the Link URL field.
- Click the green check mark to create the link and close the link dialog.
- Click Save at the top of the page to commit the change.
A predefined subject for the message can be added by appending ?subject= followed by an appropriate subject to the email address in the Link URL field (e.g. mailto:aaas-dgs@duke.edu?subject=General Inquiry).
Link to an anchor
Creating a link to an anchor on the same page as the link requires two steps: Creating the anchor (if it doesn't exist), and creating the link to that anchor.
Creating the anchor
- Place your cursor in the formatted text field where you wish to add the anchor.
- Click the Anchor button in the toolbar; the anchor dialog will appear where you cursor is located.
- Enter the anchor name in the Anchor name field. Keep the name short, unique, and avoid special characters (e.g. hash tags, question marks, slashes, equal signs, spaces, etc.) when creating the anchor name; hyphens and underscores are acceptable. For example, my_anchor_name.
- Click the green check mark to create the anchor and close the anchor dialog.
Creating the link
- Highlight the text that will comprise the link and click the Link button in the toolbar.
- The link dialog will appear beneath the highlighted text; in the Link URL field, enter a pound sign (#) followed by the anchor name. For example, #my_anchor_name.
- Click the green check mark to create the link and close the link dialog.
- Click Save at the top of the page to commit the change.
Editing or removing a link
- Place your cursor anywhere in the link you wish to edit or remove; the link dialog will appear beneath the link.
- To remove the link, click the Unlink button in the link dialog.
- To edit the link, click the Edit link button in the link dialog. Make the desired change, then click the green check mark to update the link and close the link dialog.
- Click Save at the top of the page to commit the change.
Linking an image
To make an embedded image link to a web address, email, or anchor, follow the steps below:
- Click to select the embedded image that you wish to use as the link.
- A contextual menu will appear above or below the image, depending on the location of the image in the editor window.
- Click the Link entity embed button or press Ctrl + K (⌘ + K on Mac)
- Enter the URL (web address), anchor name, or email address preceded by mailto: in the Link URL text field, then click the green check mark.
- Click Save at the top of the page to commit the change.
Note: While it is technically possible to use the editor to link other media embeds (audio, file, video) in the same way, these links are removed when the page is displayed in the browser.