When you open a file type that normally doesn’t
contain any HTML (for example, a JavaScript file), the file opens
in Code view (or Code inspector) instead of Design view. You can
specify which file types open in Code view.
Select Edit > Preferences (Windows)
or Dreamweaver > Preferences (Macintosh).
Select File Types/Editors from the Category list on the
left.
In the Open In Code View box, add the filename extension
of the file type you want to open automatically in Code view.
Type a space between filename extensions. You can add as
many extensions as you like.