10. Links
The "Add link" toolbar button may be used to add a link —a ref
or ptr
element— to your document.
When you use any of the "Add link" menu entries, you'll be automatically prompted to specify the value of the target
attribute.
If, after that, you want to change the link target, you may of course use the Attributes tool just like for any other attribute. However it's more convenient to right-click the ref
or ptr
element and select entry "Set Link Target" from the contextual menu.
This menu entry displays a dialog box implementing auto-completion. First type "#
" in the text field to delete the initial "???
" placeholder and thus, list all possible link targets.
An internal link uses syntax "#ID_OF_TARGET_ELEMENT
" for the value of its target
attribute. Example: "#ch1
", where "ch1
" is the xml:id
of the first div
of the document being edited. Auto-completion works great for internal links. The above dialog box automatically lists all the possible target
values.
An external link typically starts with "http://
" or "https://
" (e.g. "https://tei-c.org/
"). You can also use the above dialog box to type the URL of an external link, but of course, in this case, auto-completion will not be active.