decorative banner

Defining text macros


    You define text macros by opening the desired source macro file with GoLive or a text editor and then typing, copying and pasting, or dragging the appropriate code. Text macro definitions must have the following basic format:

        MacroName [Delimiter]MacroContent[Delimiter]

    The first element in a macro definition is the macro name you enter before pressing Shift+Ctrl+M (Windows) or Shift+Command+M (Mac OS). With the exception of spaces and tabs, you can use any combination of characters for a macro name, but you should restrict yourself to using letters and digits. The source code editors differ in what they regard as self-contained words. For example, using a dollar sign ($) in a macro name might work in the Source Code Editor but will fail in the JavaScript Editor because this character is an integral part of the JavaScript syntax.

    Separated by a space character, the second element specifies the content of the macro--that is, the text that is actually inserted after you type the macro name and press Shift+Ctrl+M (Windows) or Shift+Command+M (Mac OS). The content element must be enclosed in two identical or complementary delimiter characters. When you prompt GoLive to insert a text macro, the macro interpreter will regard the first character after the separating blank space as the delimiter and look for an identical character to determine where the content ends.

    For example, an image element macro with basic attributes could look like this:

        image «<img "src=../GIFS/???.GIF" width="20" height="20">»

    You can also use a text macro to insert a string of formatted text. Here is an example:

        webdesign $This Web Site was designed using <B>GoLive.</B>$