Custom Dreamweaver DocTypes
        Posted  
        
            by 
                Hugh Guiney
            
        on Super User
        
        See other posts from Super User
        
            or by Hugh Guiney
        
        
        
        Published on 2011-03-08T04:00:38Z
        Indexed on 
            2011/03/08
            8:13 UTC
        
        
        Read the original article
        Hit count: 314
        
- Dreamweaver CS5 with Dreamweaver HTML5 Pack 1.2.7
- Windows 7 x64
When I go to create a new document and select the HTML5 DocType, Dreamweaver gives me the legacy encoding/character set declaration:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
I want to replace it with the new, abbreviated style:
<meta charset="utf-8">
The relevant file seems to be %ProgramFiles(x86)%\Adobe\Adobe Dreamweaver CS5\configuration\DocumentTypes\NewDocuments\Default.html, which has a blank charset, that is then apparently replaced with the appropriate character set dynamically:
<meta http-equiv="Content-Type" content="text/html; charset=">
I changed it, but then new documents show up like this:
<meta charset="">
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
It seems Dreamweaver added the legacy declaration back in after my modification—and as far as I can tell, there's no way to specify that the charset definition should go in-between the quotes, either. Additionally, any modifications to Default.html apply to every DocType, whereas I only want this change to apply to the HTML5 DocType.
Is there anything in the configuration files that would allow me to make any of these customizations? If not, is there an extension that does it?
© Super User or respective owner