decorative banner

Using text macros with source code editors


    Text macros can save you time if you frequently use the Source Code Editor and the JavaScript Editor. They eliminate typing lengthy strings of source code for often-used tags and script elements.

    The text macros are stored in the following editable files that reside in a special Text Macros folder within the Modules folder in the GoLive program folder:

    • The Default.macro file can hold any combination of HTML elements and JavaScript strings. You can insert these objects in any of GoLive's editors. This file is GoLive's default repository for text macros.
    • The HTML Source.macro file can hold text as well as HTML elements. You can insert these macros into the HTML source code in the Source Code Editor.
    • The JavaScript Source.macro file holds prefabricated strings of JavaScript code. You can insert these elements into the JavaScript source code in the JavaScript Editor.

    All text macro files are loaded when GoLive starts up to make them available throughout the application. The JavaScript Source.macro file, however, is loaded only if the Scripting module is enabled in the Modules preferences. (See Setting preferences for program modules.)

Related Subtopics: