decorative banner

Setting JavaScript preferences


    The following JavaScript preferences let you control how the JavaScript Editor works and how scripts appear in the JavaScript Editor:

    • The general JavaScript preferences turn on and off support for dragging marked text and control how JavaScript code appears in the JavaScript Editor. A preview pane in the Preferences dialog box shows you how the code looks with the options you select.
    • Font preferences control the default screen font that displays JavaScript code and content in the JavaScript Editor.
    • Colors preferences let you turn syntax highlighting on and off and set the color of JavaScript code items in the JavaScript Editor.
    • Printing options let you make the printed version of your JavaScript source code look different than the online version in the JavaScript Editor.

To set general JavaScript preferences:

  1. Choose Edit > Preferences and then select the JavaScript icon.
  2. Set the following preferences to control how the JavaScript Editor works:
    • Enable Dragging of Marked Text turns dragging on or off.
    • Auto Indent controls the automatic indenting of lower level script elements.
    • Line Numbers displays line numbers at the left margin of the JavaScript Editor.
    • Word Wrap lets the JavaScript code wrap automatically in the JavaScript Editor.
    • Tab Size sets the width of the indentation (in characters) added when you press the Tab key.
  3. Click OK.

To set Font preferences:

  1. Choose Edit > Preferences, and then select Font under JavaScript preferences.
  2. Select a typeface, font size, and style for JavaScript code. This typeface appears only within the JavaScript Editor and not on a Web page.
  3. Click OK.

To set syntax highlighting preferences:

  1. Choose Edit > Preferences, and then select Colors under JavaScript preferences.
  2. Select Enable Syntax Highlighting to set the default appearance of the various code elements in the JavaScript Editor.
  3. To select a color for a code element, click the color field for the element, select a new color, and then click OK in the Color dialog box.
  4. Click OK.

To set printing preferences:

  1. Choose Edit > Preferences, and then select Printing under JavaScript preferences.
  2. To make the printed version of your JavaScript source code look different than the online version in the JavaScript Editor, select these preferences:
    • Use Printer Specific Settings lets you print using color attributes for syntax highlighting (only useful on a color printer), bold typeface, or line numbers.
    • Use Special Font For Printing lets you apply a custom typeface, size, and style.
  3. Click OK.