blob: 5083676beffb807e679db5e82bebdb8cb0d29875 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!--Arbortext, Inc., 1988-2006, v.4002-->
<task id="tsrcedt005" xml:lang="en-us">
<title>Getting content assistance in structured text editors</title>
<!--Formerly "Using JavaScript content assist"; moved some JavaScript-specific content to csrcedt006.dita ("Content assist")-->
<navtitle>Getting content assistance</navtitle>
<shortdesc>To get help in adding markup to a file, you can use content assist
in a structured text editor. Content assist helps you insert or finish a tag
or function or finish a line of code in a structured text editor.</shortdesc>
<keywords><indexterm keyref="tsrcedt005|1|contentassistancestructuredtexteditors"
status="new">content assistance<indexterm>structured text editors</indexterm></indexterm>
<indexterm keyref="tsrcedt005|2|structuredtexteditorscontentassistance" status="changed">structured
text editors<indexterm>content assistance<indexterm>text editors</indexterm></indexterm></indexterm>
<context>Content assist also enables you to select and insert templates in
structured text editors. The placement of the cursor in the source file provides
the context for the content assist to offer suggestions for completion.</context>
<step><cmd></cmd><info>You can request content assist in either of the following
two ways:</info>
<choice>From the <uicontrol>Edit</uicontrol> menu, select <uicontrol>Content
<choice>Press Ctrl+Space</choice>
<info><p>In addition, you can set a preference that causes content assist
to pop up automatically when certain characters are typed, such as <codeph>.</codeph> in
the case of <tm tmclass="special" tmowner="Sun Microsystems, Inc." tmtype="tm"
trademark="JavaScript">JavaScript</tm> or <codeph>&lt;</codeph> in the case
of HTML and XML. To set this preference, select <uicontrol>Preferences</uicontrol> from
the <uicontrol>Window</uicontrol> menu, and then select <uicontrol>Web and
XML Files</uicontrol>, followed by one of the following sequences:<ul>
<li><menucascade><uicontrol>HTML Files</uicontrol><uicontrol>HTML Source</uicontrol>
<li><menucascade><uicontrol>JavaScript Files</uicontrol><uicontrol>JavaScript
<li><menucascade><uicontrol>XML Files</uicontrol><uicontrol>XML Source</uicontrol>
</ul>In the <uicontrol>Content assist</uicontrol> group box, select the <uicontrol>Automatically
make suggestions</uicontrol> check box, and supply any additional characters
that should trigger content assist.</p><p>If your cursor is in a position
where content assist is available, a pop-up list of all available choices
is displayed. For each of these choices, a brief description of the code is
<!-- <link href="contentassist" type="showme" format="viewlet"><linktext>Show Me</linktext></link> -->
<linkpool type="concept">
<link href="csrcedt006.dita"><linktext>Content assist</linktext></link>
<link href="csrcedt004.dita"><linktext>Structured text editors for markup
<linkpool type="task">
<link href="tsrcedt023.dita"><linktext>Making content assist work for JSP
<link href="tsrcedt027.dita"><linktext>Adding and removing markup language
templates - overview</linktext></link>
<link href="tsrcedt000.dita"><linktext>Editing text coded in markup languages
- overview</linktext></link>