How custom tags appear in the design view, Avoiding third-party tag overwrites – Adobe Extending Dreamweaver CS4 User Manual
Page 15
9
EXTENDING DREAMWEAVER CS4
Customizing Dreamweaver
How custom tags appear in the Design view
The way that custom tags appear in the Design view of the Document window depends on the values of the
tag_type
and
render_contents
attributes of the
tagspec
tag. If the value of
tag_type
is
"empty"
, the icon specified in the
icon
attribute appears. If the value of
tag_type
is
"nonempty"
but the value of
render_contents
is
"false"
, the
icon appears as it would for an empty tag. The following example shows how an instance of the
happy
tag defined
earlier might appear in the HTML:
This is a paragraph that includes an instance of the happy
tag (
Because
render_contents
is set to
"false"
in the tag specification, the contents of the
happy
tag (the word
Joe
) are
not rendered. Instead, the start and end tags and their contents appear as a single icon.
For nonempty tags that have a
render_contents
value of
"true"
, the icon does not appear in the Design view;
instead, the content between the opening and closing tags (such as the text between the tags in
content between the opening and closing tags
) appears. If View > Invisible Elements is enabled,
the content is highlighted using the third-party tag color specified in Highlighting preferences. (Highlighting applies
only to tags defined in tag database files.)
Change the highlighting color of third-party tags
1
Select Edit > Preferences, and select the Highlighting category.
2
Click the Third-Party Tags color box to display the color picker.
3
Select a color, and click OK to close the Preferences dialog box. For information about selecting a color, see Using
Dreamweaver.
Avoiding third-party tag overwrites
Dreamweaver corrects certain kinds of errors in HTML code. For details, see Using Dreamweaver. By default,
Dreamweaver refrains from changing HTML in files with certain filename extensions, including .asp (ASP), .cfm
(ColdFusion), .jsp (JSP), and .php (PHP). This default is set so that Dreamweaver does not accidentally modify the
code contained in any such non-HTML tags. You can change the Dreamweaver default rewriting behavior so that it
rewrites HTML when it opens such files, and you can add other file types to the list of types that Dreamweaver does
not rewrite.
Dreamweaver encodes certain special characters by replacing them with numerical values when you enter them in the
Property inspector. It’s usually best to let Dreamweaver perform this encoding because the special characters are more
likely to display correctly across platforms and browsers. However, because such encoding can interfere with third-
party tags, you may want to change the Dreamweaver encoding behavior when you’re working with files that contain
third-party tags.
Allow Dreamweaver to rewrite HTML in more kinds of files
1
Select Edit > Preferences, and select the Code Rewriting category.
2
Select either of the following options:
•
Fix Invalidly Nested And Unclosed Tags
•
Remove Extra Closing Tags
3
Do one of the following:
•
Delete one or more extensions from the list of extensions in the Never Rewrite Code: In Files With Extensions
option.