WebDesign allows you to create custom keyword files that WebDesign will load when it is launched and use to color the specified keywords. These custom keyword files allow you customize WebDesign's syntax coloring abilities and add syntax coloring support for languages not directly supported by WebDesign. For example, by default, WebDesign provides syntax coloring for HTML, XHTML, CSS, PHP, JavaScript, ASP, XML, VBScript through the use of syntax files.
Keyword files are simply XML files which give instructions to WebDesign on how to color documents. The best way to learn about creating syntax files is to look at the ones that are already provided. You can find the default Syntax Files in the Syntax Files folder located in the Support Folder in the same folder as the WebDesign application.
The format of a syntax file is shown below using the HTML Syntax File, provided by default in WebDesign, as an example;
<SyntaxFile>To let WebDesign know about your custom Syntax File, place the Syntax files in the 'Syntax Files' folder within the 'Support Folder'. If there is no 'Syntax Files' folder you can create one. The Syntax files can be given any name, however, it is recommended that you keep the names short so that they will show up correctly in WebDesign's preferences dialog. For more details on using Syntax Files in WebDesign see Customizing the Text Editor and Document Modes in this user manual.
Adding Language ExtensionsLearning a new language and coding one can be very difficult. It is hard to remember all the proper syntax rules or even the built in variables or functions. This is where WebDesign's Language Extensions will come in handy. They can provide specific code to be entered either by double clicking or dragging an item from the Language Extensions window to your document.
WebDesign Language Extensions can be created directly in WebDesign. Language Extensions are simple text files which follow a certain format. The Language Extension format looks like this;
#NEW=LANGUAGE EXTENSION HEADER (APPEARS IN BOLD IN WEBDESIGN - since no text is placed within the NEW tags) #/NEW #NEW=LANGUAGE EXTENSION ITEM 1 (APPEARS IN BOLD IN WEBDESIGN) Text to be inserted into your document. Insertion point appears before ^! http://www.url_to_help_resource.com/ #/NEW #NEW=LANGUAGE EXTENSION ITEM 2 This text is inserted on one line.\rThis text inserted on the next line http://www.url_to_help_resource.com/ #/NEW
A new Language Extension item is specified with the #NEW keyword, followed by an = sign then by the text that should appear in the Language Extensions list (See Window menu->Language Extensions for an example of how Language Extensions look in WebDesign). As you can see, all the text listed is just the text after the = sign.
The next line specifies the text that should be inserted into your document when you double click a Language Extension item. You can specify where the insertion point should be by placing ^! where the insertion should go. You can also specify line breaks using \r which WebDesign will convert to line breaks when the Language Extension item is double clicked. This is because you are only allowed one line to write the text that should be entered. You can also specify tabs using \t.
The next line lets you specify a url to a help or more information resource. If one is specified, a question mark icon within the Language Extension window will be displayed beside the Language Extension item. When clicked, the help page will be loaded within WebDesign's help reference.
You can create as many Language Extension items as you like. THE #NEW keyword creates a new Language Extension item while the #/NEW keyword closes one that was previously opened. Make sure each #NEW and #/NEW keyword is on a separate line.