Code hints

Code hints are menus that Adobe Dreamweaver opens when you type certain character patterns in the Code view. Code hints offer a typing shortcut by providing a list of strings that potentially complete the string you are typing. If the string you are typing appears in the menu, you can scroll to it and press Enter or Return to complete your entry. For example, when you type <, a pop-up menu shows a list of tag names. Instead of typing the rest of the tag name, you can select the tag from the menu to include it in your text.

Adobe Dreamweaver loads Code Hints menus from the CodeHints.xml file in the Configuration/CodeHints folder. You can add Code Hints menus to Adobe Dreamweaver by defining them in the CodeHints.xml file. After Adobe Dreamweaver loads the contents of CodeHints.xml, you can also add new Code Hints menus dynamically through JavaScript. For example, JavaScript code populates the list of session variables in the Bindings panel. You can use the same code to add a Code Hints menu, so when a user types "Session." in Code view, Adobe Dreamweaver displays a menu of session variables. For information on using JavaScript to add or modify a Code Hints menu, see Code Functions in the Adobe Dreamweaver API Reference.

Adobe Dreamweaver cannot express some types of Code Hints menus through the XML file or the JavaScript API. Both the CodeHints.xml file and the JavaScript API expose a useful subset of the Code Hints engine, but some Adobe Dreamweaver functionality is not accessible. For example, there is no JavaScript hook to open a color picker, so Adobe Dreamweaver cannot express the Attribute Values menu using JavaScript. You can only open a menu of text items from which you can insert text.

NOTE

When you insert text, the insertion pointer is placed after the inserted string.