This TechNote applies to the following related symptoms in Adobe Dreamweaver:
- When opening a file, you see this error message: "Can't find a valid editor for this file extension."
- The color-coding in Code view isn't matching the color-coding for the file type you want.
- The server-model functionality isn't available for your file type.
- You cannot open a page in Design view. It only opens in Code view.
- When you go to File > Save, or File > Open, you don't see the file type you want.
Dreamweaver ships with the ability to edit and display many different file types. This TechNote focuses on customizing Dreamweaver to recognize new file types by editing the Extensions.txt and MMDocumentTypes.xml files, and setting the Open In Code View settings to see the new file types in Design view.
- The Extensions.txt file
The Extensions.txt file is a text file listing all file types recognized by Dreamweaver. This file can be edited in any external text editor like Notepad or Text Editor to add to the list of recognized file types. Do not modify the Dreamweaver configuration files in Dreamweaver itself.
- The MMDocumentTypes.xml file
The MMDocumentTypes.xml file contains definitions of document types as well as a list of file extensions associated with each recognized document type. Adding file extensions to the Extensions.txt file allows Dreamweaver merely to recognize a file extension and allow files of this type to be opened in Dreamweaver. Adding file extensions to the MMDocumentTypes.xml file tells Dreamweaver how to treat this new file extension and to which document type this file extension belongs.
Note: For the purpose of this TechNote, only basic aspects of editing the MMDocumentTypes.xml file will be discussed. For a detailed overview of editing this file, see Extending Dreamweaver (from within Dreamweaver, choose Help > Extending Dreamweaver, and search on MMDocumentTypes.xml).
- Open in Code View
The Open in Code View preference identifies file extensions that do not allow Design view. After following the instructions in this TechNote, be sure to remove the file extension (if it is listed) from the Open In Code View preference to allow file editing in Design view. To set this preference, choose Edit > Preferences (Windows) or Dreamweaver > Preferences (Mac OS), and locate the File Types / Editors category.