Make Link Help - Defining Link Types

Make Link comes with some useful default link types, but its real power lies in your ability to add your own types, or even to remove the defaults! This document is a short description of what you need to know to create your own link types for Make Link.

Contexts

Make Link creates links differently depending on the context in which it is invoked, ie. depending on what the user right-clicks on to get the Make Link menu. The three contexts are link, selection, and page.

Link
When you select a Make Link option after right-clicking on a link it will be invoked in link mode.
Selection
When you select a Make Link option after right-clicking on some selected (highlighted) text it will be invoked in selection mode.
Page
When you select a Make Link option by any other method it will be invoked in page mode.

Variables

Make Link recognises a set of variables which represent the various data related to links. For example the variable %URL% represents the URL (web address) of a link. When you define the format for a link type in Make Link you do so by combining plain text with these variables. For example the Plain Text link type (one of Make Link's defaults) has the format “%TEXT% (%URL%)”. Make Link interprets this format by replacing %TEXT% with the actual text of the link and %URL% with the URL of the link.

The contents of some variables depend on the context in which it was invoked. The variables are as follows:

%TEXT%
The text of the link.
In link context: the text of the original link.
In selection context: the selected text.
In page context: the page title element (the text that appears in the title-bar).
%URL%
The URL of the link.
In link context: the href attribute of the original link (the URL of the target page or resource).
In selection context: the URL of the current page.
In page context: the URL of the current page.
%TITLE%
The link title.
In link context: the title attribute of the original link (the tool-tip text).
In selection context: the page title element (the text that appears in the title-bar).
In page context: the content attribute of any meta element with its name attribute set to “description”.
%INPUT%
The user is prompted each time and the provided text goes in this variable.