Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.

HTML syntax editor

Log in to subscribe to topics and get notified when content changes.

HTML syntax editor

The HTML syntax editor provides support for editing HTML and Jelly scripts and defines what is rendered when the page is displayed. Can contain either static XHTML or dynamically generated content defined as Jelly, and can call script includes and UI Macros.

The syntax editor has these features.
  • HTML and Jelly script support
  • HTML and Jelly syntax coloring, indentation, line numbers, and automatic creation of closing braces and quotes
  • Auto-suggestions for HTML and Jelly tags
    Note: Keyboard shortcut is Ctrl+Space.
  • Script macros for common code shortcuts
Figure 1. HTML syntax editor
Syntax editor for HTML and Jelly scripts.
Table 1. HTML and Jelly editing functions
Icon Keyboard shortcut Name Description
Toggle syntax editor icon N/A Toggle syntax editor Disables the syntax editor. Click the button again to enable the syntax editor.
Toggle comment icon Cmd+/ Toggle comment Comments the selected code.
Replace icon Cmd+E Replace Replaces the next occurrence of a text string in the script field.
  1. Click the icon, then enter the string to replace and press Enter. You can use regular expressions enclosed in slashes to define the string to replace. For example, the term /a{3}/ locates aaa.
  2. Enter the replacement string and press Enter.
Replace all icon Cmd Replace All Replaces all occurrences of a text string in the script field.
  1. Click the icon, then enter the string to replace and press Enter. You can use regular expressions enclosed in slashes to define the string to replace. For example, the term /a{3}/ locates aaa.
  2. Enter the replacement string and press Enter.
Start searching icon Cmd+F Start Searching Highlights all occurrences of a search term in the script field and locates the first occurrence. Click the icon, then enter the search term and press Enter.
Find next icon Cmd+G Find Next Locates the next occurrence of the current search term in the script field. Use Start Searching to change the current search term.
Find previous icon Cmd+Shift+G Find Previous Locates the previous occurrence of the current search term in the script field. Use Start Searching to change the current search term.
Toggle full screen icon Ctrl+M Toggle Full Screen Expands the script field to use the full form view for easier editing. Click the button again to return to standard form view. This feature is not available for Internet Explorer.
Help icon Cmd+H Help Displays the keyboard shortcuts help screen.
Save icon N/A Save Saves changes without leaving the current view. Use this button in full screen mode to save without returning to standard form view.

Editing tips

  • To insert a fixed space anywhere in your code, press Tab.
  • To indent a single line of code, click in the leading white space of the line and then press Tab.
  • To indent one or more lines of code, select the code and then press Tab. To decrease the indentation, press Shift+Tab.
  • To remove one tab from the start of a line of code, click in the line and press Shift+Tab.
Feedback