Insert code with the insert panel – Adobe Dreamweaver CC 2015 User Manual
Page 382
375
Coding
Last updated 6/3/2015
Note: This option is not available for HTML, CSS, and JS files. Use linting in these files to find potential errors in code.
Syntax Error Alerts in Info Bar
Enables or disables an information bar at the top of the page that alerts you to syntax
errors. When Dreamweaver detects a syntax error, the Syntax Error Information Bar specifies the line in the code
where the error occurs. Additionally, Dreamweaver highlights the error’s line number on the left side of the
document in Code view. The info bar is enabled by default, but only appears when Dreamweaver detects syntax
errors in the page.
Note: This option is not available for HTML, CSS, and JS files. Use linting in these files to find potential errors in code.
Apply Comment
Lets you wrap comment tags around selected code, or open new comment tags.
• Apply HTML Comment wraps the selected code with , or opens a new tag if no code is selected.
• Apply // Comment inserts // at the beginning of each line of selected CSS or JavaScript code, or inserts a single
// tag if no code is selected.
• Apply /* */ wraps the selected CSS or JavaScript code with /* and */.
• Apply ' Comment is for Visual Basic code. It inserts a single quotation mark at the beginning of each line of a
Visual Basic script, or inserts a single quotation mark at the insertion point if no code is selected.
• When you are working in a ASP, ASP.NET, JSP, PHP, or ColdFusion file and you select the Apply Server
Comment option, Dreamweaver automatically detects the correct comment tag and applies it to your selection.
Remove Comment
Removes comment tags from the selected code. If a selection includes nested comments, only
the outer comment tags are removed.
Wrap Tag
Wraps selected code with the selected tag from the Quick Tag Editor.
Recent Snippets
Lets you insert a recently used code snippet from the Snippets panel. For more information, see
Move or Convert CSS
Lets you move CSS to another location, or convert inline CSS to CSS rules. For more
information, see
.
Indent Code
Shifts the selection to the right.
Outdent Code
Shifts the selection to the left.
Format Source Code
Applies previously specified code formats to selected code, or to the entire page if no code is
selected. You can also quickly set code formatting preferences by selecting Code Formatting Settings from the
Format Source Code button, or edit tag libraries by selecting Edit Tag Libraries.
The number of buttons available in the Coding toolbar varies depending on the size of the Code view in the
Document window. To see all of the available buttons, resize the Code view window or click the expander arrow at
the bottom of the Coding toolbar.
You can also edit the Coding toolbar to display more buttons (such as Word Wrap, Hidden Characters, and Auto
Indent) or hide buttons that you don’t want to use. To do this, however, you must edit the XML file that generates
the toolbar. For more information, see Extending Dreamweaver.
Note: The option to view hidden characters, which is not a default button in the Coding toolbar, is available from the
View menu (View > Code View Options > Hidden Characters).
Insert code with the Insert panel
1
Position the insertion point in the code.
2
Select an appropriate category in the Insert panel.
3
Click a button in the Insert panel or select an item from a pop-up menu in the Insert panel.