Structured text editors for markup languages

"Structured text editor" is any of several text editors that you can use to edit various markup languages such as HTML, JavaScriptâ„¢, or XML.

The structured text editor is represented by various editors that you can use to edit files coded with markup tags:

File type Editor Content assist?
Cascading style sheet CSS source page editor Yes
Document type definitions DTD source page editor No
HTML HTML source page editor Yes
JavaScript JavaScript source page editor or source tab of JavaScript editor Yes
JSP JSP source page editor Yes
XML Source tab of XML editor Yes
XSD (schema) Source tab of XML schema editor Yes

You can access the structured text editor by right-clicking on a relevant file name in Navigator or Package Explorer view and then clicking

Open With and selecting the editor mentioned above.

The structured text editor provides a consistent interface regardless of the markup language with which it is associated. It provides capabilities such as find and replace, undo, redo, a spelling checker, and coding assistance (unless otherwise noted). It also highlights syntax in different colors. Following is a brief description of some of the structured text editor's capabilities:

syntax highlighting

Each keyword type and syntax type is highlighted differently, enabling you to easily find a certain kind of keyword for editing. For example, in HTML, element names, attribute names, attribute values, and comments have different colors; in JavaScript, function and variable names, quoted text strings, and comments have different colors.

unlimited undo and redo

These options allow you to incrementally undo and redo every change made to a file for the entire editing session. For text, changes are incremented one character or set of selected characters at a time.

content assist

Content assist helps you to insert JavaScript functions, HTML tags, or other keywords. Choices available in the content assist list are based on functions defined by the syntax of the language in which the file is coded.

user-defined templates and snippets

By using the Snippets view, you can access user-defined code snippets and (for all code types except JavaScript) templates to help you quickly add regularly used text strings.

function selection

Based on the location of your cursor, the function or tag selection indicator highlights the line numbers that include a function or tag in the vertical ruler on the left area of the Source page.

pop-up menu options

These are the same editing options available in the workbench

Edit menu.

 

Related concepts

Content assist

 

Related tasks

Editing text coded in markup languages - overview

Setting preferences for structured text editors

Setting annotation preferences for markup languages

Editing text coded in markup languages - overview