Code Coloring specific Tags

Many Dreamweaver versions ago, there was an Preference setting where you could specify a unique code color for certain tags in the Code View. You can still do that, but there is no longer a UI, which means you need to edit some XML.
Take a look at the Configuration/CodeColoring/CodeColoring.xml file. At the very end of the file, you’ll see some <tagGroup> tags that specify a list of one or more tag names in the tags attribute. The name field is what gets displayed in the Code Coloring Preferences Styles list so you can use the "Editing Coloring Scheme" dialog for setting the color of the group of tags.

4 Responses to Code Coloring specific Tags

  1. Danilo Celic says:

    Randy,
    Just curious about what you mean by that there isn’t a UI to change tag colors?
    Edit -> Preferences -> Code Color Coloring, Select HTML, then click Edit Coloring Scheme. That will allow you to edit the colors for a number of tags. Granted, some are grouped, such as table tags (table, tr, th, td) and form tags (form, input, textarea) so you do not have fine grained control like you will if you edit the CodeColoring.xml file, but there is at least some UI for editing.

  2. Randy Edmunds says:

    Hi Danilo,
    Thanks for letting me know where my details fall short! For those of you who don’t know me, I’m an engineer, so my explanations tend to be very concise. Please let me know when you’d like more details.
    The Tag Colors that are available for editing in the Code Coloring Preferences page are the ones defined by the tags present in the CodeColoring.xml file delivered with DW. So, yes, there is a UI for *changing* Tag Colors once they are defined, but there is not a UI for *defining* the tag groups themselves.

  3. Wolfgang Litzlbauer says:

    Hi Randy,
    Is there a way to define a tagGroup for a whole tag namespace?
    <tagGroup name=”FBML” id=”FBML” taglibrary=”DWTagLibrary_html” tags=”fb:*” />

    Thanks,
    Wolfgang