Kay lives here

working with the web

Dreamweaver Fusedocs

I’m a bit of a code coloring fanatic, so one of the first things I did with Dreamweaver was try to work out how to get around commented-out fusedocs taking on the commented-out color and style. It took a bit of experimentation, countless restarts of the program, and a little help from someone with inside knowledge, but it works and it also allows you to set different colours and styles for text, tags, attributes and values.

This was originally posted on the fusewiki but that site has been pretty flaky lately, so here it is.

Nicely Coloured Dreamweaver Fusedocs

If you’re working with FuseDocs a lot in Dreamweaver, you’ll want to have use of the tag completion and tag insight features, custom colours, and the ability to comment out your FuseDocs so they are not sent to the browser, without losing your custom colour coding or altering the normal behaviour of CF comments.

Luckily, Dreamweaver is extremely customisable.

Note: These instructions are for ColdFusion. For PHP support, mark the PHP box on the Tag Libraries->Fusebox DTD “Uses In:” box and add PHP_MySQL to the doctypes parameter of the blockStart tag in the Code Coloring snippet.

  1. Firstly you need to have imported the FuseDoc DTD into the Tag Library. If you haven’t done this, go to the Edit menu within DWMX and select Tag Libraries. Click the plus icon in the top left hand corner and select DTDSchema – Import XML DTD or Schema File. In the supplied space, enter the URL of the FuseDoc DTD – http://www.fusebox.org/fd4.dtd – or you can browse for the file if you have a local copy. The tag prefix is not a requirement, but it might be a good idea – there have been threads about this issue on the Fusebox mailing list, check them out if you are interested.You are now returned to the Tag Library Editor, with the newly imported DTD open in the tree. Make sure the ColdFusion checkbox is ticked in the “Used in:” box – this is really important! If you want to add some default values to any of the attributes (your name for the author in the history tag, for example) you can do this from this dialog.
  2. Close DWMX. Now you need to open Dreamweaver’s Codecoloring.xml file. To prevent the universe imploding, it’s probably better not to edit this file in Dreamweaver itself. I did all of my experiements just using Notepad. On Win2K and XP, the file will by default be in:drive:\Documents and Settings\USername\Application Data\Macromedia\Dreamweaver MX\Configuration\Codecoloring

    I’m not sure about where Win98 keeps these files – if someone wants to let me know I’ll update this page. Is anyone still using Win98 anyway?

    And make sure you have a backup!

    Add to Codecoloring.xml (put it anywhere after the openingtag):

    Yes
    No

    ]]>

    Save and close Codecoloring.xml.

  3. Open DWMX. Open Edit -> Preferences, select Code Coloring. Select ColdFusion as the document type and click Edit Coloring Scheme.You will now have four extra entries in the “Edit Coloring Scheme for ColdFusion” dialog:
    • FuseDoc tags (fusedoc, responsibilties, properties etc)
    • FuseDoc Text: text not contained within a tag, such as the text in the responsibilities section.
    • FuseDoc Attribute: any attribute (fuse, language, specification, author etc)
    • FuseDoc Attribute Value: anything within double quotes

    Change these colors to whatever you want for your FuseDocs. Then click OK. And that’s it!