17 Replies Latest reply: Oct 9, 2014 3:31 PM by demasso RSS

    Adding Doc Type for Color Coding

    steeletech

      I'm using DW to modify my .LUA files, and I'd love to create the rules for Code Coloring.

       

      Is there a way to add a new Document Type for this purpose?

      I'm using CS6 now.

        • 1. Re: Adding Doc Type for Color Coding
          David_Powers CommunityMVP

          Deatils on how to add new document types to Dreamweaver are here: http://helpx.adobe.com/dreamweaver/kb/change-add-recognized-file-extensions.html.

           

          There's also an old article on extensible colour coding here: http://www.adobe.com/support/dreamweaver/extend/extensible_code_coloring/

           

          I'm not sure if significant changes have been made to colour coding since that article was written. Maybe you could try it and report back here. If it's out of date, I'll contact the engineering team to see if more up-to-date material is available.

          • 2. Re: Adding Doc Type for Color Coding
            steeletech Community Member

            Hi David!  thanks for responding.  So here's what I could find out, and this will be rather verbose.

            -I'll add pics for what I was attempting to do, and maybe the engineering team has thoughts on the matter.

             

            Seems there's no real clear way to add a new Document Type.  And I believe the link you sent me are either out-dated, or possibly there are some missing crutial steps.

             

            I LOVE DW!  So I'm not knocking it! 

            Ok, here's what I've got....

             

            This pic shows the New Doc options (CTL+N):

            new_document_pop.jpg

             

            I'd love to see my new File Type inside that list, if possible. Perhaps the instructions are not meant for this type of extensibility.

             

            I followed the instructions on this site:

            http://helpx.adobe.com/dreamweaver/kb/change-add-recognized-file-extensions.html

            Adding the new file extension to the Extensions.txt file is the easiest part of this whole thing.  And it seems to work, for me to open something in DW, in code view only.

            The MMDocumenttypes.xml file is an entirely different story.   Here's what I attempted to do:

            MMDocumentTypes.jpg

            I hightlighted the code I added, right below the HTML document type.  I honestly haven't seen any changes in DW, after restarting.

            Also, I'm not sure what I should put for the <MMString:loadString id="???????" />   I noticed all the other documents had numbers incremented, so I followed suit.  Still not sure what it's actually doing.

             

             

            In the end I want to see my new Document Type in here:

            pref_colorcodes.jpg

            I'm expecting the "LUA" option to show in the "Document Type" list. 

            And to make it even more complicated, here's this snapshot of the PHP selection:

            pref_colorcodes_styles.jpg

            After fuddling around inside the DW CS6 configuration files and folders, restarting the service, etc....... I'm wondering if I'm not really meant to add a new Language.  Perhaps I'm only really allowed to add a new Doc Type for simply opening the file in DW, but without color-coding options.

             

            I'm still hopeful I'm just missing steps.

            I've looked in several places for the "Styles" listed in that box above.  I simply cannot seem to find those styles in any xml docs. ( "ColdFusion Script Tag"........)

             

            I know they are being defined, but finding them is another thing.

             

            So, I read that PDF you sent me, and it was more informative, and I was able to make some tests.  But not the outcome I'm hoping for.

             

            Up to this point I plan to still keep testing, but if your engineering team has easier insight, or better ideas, I'm all ears!

            • 3. Re: Adding Doc Type for Color Coding
              David_Powers CommunityMVP

              I don't think that adding new file types will allow you to add them to the New Document dialog box, but I've asked someone from Adobe to take a look at this thread. I suspect that the documents are out of date and need to be revised.

              • 4. Re: Adding Doc Type for Color Coding
                steeletech Community Member

                You're probably right.  The docs do seem to be meant for DW MX.

                I'm fine with not adding a New File type to the New Document dialog box.

                 

                But I am very interested in adding a new File type to the Color Coding section.

                I have a few languages I want to add, with their own color coding styles. 

                 

                If this is something that can't be supported for a while, it's fine.  But it would be nice to know.

                • 5. Re: Adding Doc Type for Color Coding
                  David_Powers CommunityMVP

                  I've been in touch with the engineering team, and they've promised to get the documents updated. They might even contact you directly.

                  • 6. Re: Adding Doc Type for Color Coding
                    steeletech Community Member

                    Happy 4th of July!

                    If the engineering team does contact me, I'll probably be a loyal customer forever. 

                    Now that Adobe offers the Creative Cloud, I don't have to worry about latest updates and OS compatibilities.  I truly love DreamWeaver.

                    I know other DW users who have asked for the same thing.  (concerning color coding other languages)

                    Thanks David, I appreciate your help in this.

                    • 7. Re: Adding Doc Type for Color Coding
                      yshivaprasad Adobe Employee

                      Hello,

                       

                      Extremely sorry for the outdated contents in the above mentioned documents.

                      I have logged a backlog to update the documents and also a feature request. We will surely address the same.

                       

                      Regards,

                      Yalpi Shiva Prasad

                      Adobe Dreamweaver Team

                      • 8. Re: Adding Doc Type for Color Coding
                        steeletech Community Member

                        thank you Yalpi!   My development team is very interested to use DreamWeaver for other languages, and the syntax color-coding is an amazing help for us.   Allowing us to customize our own, or other languages will practically solidify us in the Adobe world.

                        • 9. Re: Adding Doc Type for Color Coding
                          iLoyola7

                          Hi, I'm using Dreamweaver CS6 Creative Cloud and I'm trying to add the extension EJS and SCSS. I've followed this walkthrough; http://helpx.adobe.com/dreamweaver/kb/change-add-recognized-file-extensions.html. Adding it to HTML and Stylesheet groups within the extentions.txt and added it to the appropriate <documenttype> within the MMDocumentTypes.xml.

                           

                          Still getting the "Can't find a valid editor for this file extension".

                           

                          thx

                          • 10. Re: Adding Doc Type for Color Coding
                            David_Powers CommunityMVP

                            In Dreamweaver Preferences (Edit menu on Windows, Dreamweaver menu on a Mac), select File Types / Editors.

                             

                            Add the filename extensions to the space-separated list in the "Open in code view" field..

                            • 11. Re: Adding Doc Type for Color Coding
                              iLoyola7 Community Member

                              Thank you David for the responce, yes I have them added to the "open in code view" now and the files are opening in code view but I would also like design view, color coding, and server behavior functionality which is determined in the MMDocumentTypes.xml but not working. This is what I've put for the EJS;

                              <documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,stm,tpl,lasso,xhtml,ejs" macfileextension="html,htm,shtml,shtm,tpl,lasso,xhtml,ssi,ejs" file="Default.html" writebyteordermark="false" mimetype="text/html">
                              <TITLE>
                              <MMString:loadString id="mmdocumenttypes_0" />
                              </TITLE>      
                              <description>
                              <MMString:loadString id="mmdocumenttypes_1" />
                              </description>
                              <dtdcontext>html</dtdcontext>
                              </documenttype> 

                              • 12. Re: Adding Doc Type for Color Coding
                                Lafondakitty625

                                Is there any update on this? I have updated my  Extensions.txt file and
                                MMDocumentTypes.xml to add the new file types but still can't see the color coding when I open documents of those file types.

                                I am using Dreamweaver cs6 on a mac running snow leopard. I did not have any issues when i did this on cs 5.5.

                                 

                                Thanks!

                                • 13. Re: Adding Doc Type for Color Coding
                                  WaitWut Community Member

                                  I know this is late but I've been bashing my head against my keyboard trying to figure out why this isn't working (I'm on CS6) ... apparently starting with CS5.5 (I think) ... Dreamweaver looks at another MMDocumentTypes.xml file ... this is the one you actually need to modify ... changing the one they mention in this (http://helpx.adobe.com/dreamweaver/kb/change-add-recognized-file-extensions.html) thread does nothing

                                   

                                  Wrong

                                  C:\Program Files\Adobe\Adobe Dreamweaver CS3\Configuration\DocumentTypes\MMDocumentTypes.xml

                                   

                                  Modify this one

                                  C:\Users\{USERNAME}\AppData\Roaming\Adobe\Dreamweaver CS6\en_US\Configuration\DocumentTypes\MMDocumentTypes.xml

                                  • 14. Re: Adding Doc Type for Color Coding
                                    HankBrutowsky1 Community Member

                                    Very helpful thread, this helped me too!

                                     

                                    For DreamWeaver CS5.5 OSX users, modify:

                                    /users/USERNAME/Library/Application Support/Adobe/Dreamweaver CS5.5/YOURLANGUAGE/Configuration/DocumentTypes/MMDocumentTypes.xml

                                     

                                    Adobe should update

                                    http://helpx.adobe.com/dreamweaver/kb/change-add-recognized-file-exten sions.html

                                    • 15. Re: Adding Doc Type for Color Coding
                                      jhendryx

                                      Thank you for this! It also works for Creative Cloud.

                                      • 17. Re: Adding Doc Type for Color Coding
                                        demasso Community Member

                                        dw cc 2014.1 still not able to add a new type of document with associated code coloring.  Good work!  You're about to loose even more customers.  Ah? That's the whole idea? Like I said then, GOOD [expletive deleted by moderator] work !