Posts in Category "Dreamweaver"

Adding a Tag to Dreamweaver’s Insert Panel

I usually use Dreamweaver to author blog posts and Adobe Developer Center articles, and since I’m usually writing about code, I frequently need the <code> tag. However, for some reason, the <code> tag isn’t included in Dreamweaver’s insert panel, and as far as I can tell, there’s no way to add it from inside Dreamweaver itself.

But there is a way to add it if you don’t mind working behind the scenes. The instructions below explain how to add the <code> tag to the "Text" menu of Dreamweaver’s Insert panel, but this process can obviously be adapted for any tag or menu you want.

  1. Create an 18×18 gif called Code.gif to use as the menu icon. Make sure to use a transparent background or you’ll end up with a box around it. (I made this icon, but I’m sure most of you can do better.)
  2. Place the icon in "/Applications/Adobe Dreamweaver CS5/Configuration/Objects/Text" (or whatever the corresponding directory is on your machine). If you don’t want your tag in the "Text" menu, place it in a different directory inside the "Objects" directory.
  3. Open the terminal and change into the "/Applications/Adobe Dreamweaver CS5/Configuration/Objects/Text" directory (the directory where you just put your icon file). Copy one of the htm files already there and rename it to Code.htm.
  4. Modify it accordingly. If you have any JavaScript or ActionScript experience, it should be obvious how to modify it to insert a <code> tag rather than what it was originally designed to insert. In this case, be sure to use dom.applyCharacterMarkup("code") rather than dom.setTextFormat("code").
  5. Change into the next highest directory ("/Applications/Adobe Dreamweaver CS5/Configuration/Objects") and modify the insertbar.xml file accordingly. Again, it should be obvious how to insert your new tag just by looking at the contents of this file. Be sure to set the MMString:label attribute to the actual name of the tag as you want it to appear in the insert panel (in this case, "Code").
  6. Restart Dreamweaver, then enjoy the convenience of having your tag readily available.

If you’re thinking that this seems like a lot of work to add such a common tag, I agree, so if you know of a better way of doing it, please post in the comments.

Using Dreamweaver to Write a Novel

I recently released my first science fiction novel entitled Containment, and I wrote most of it using Dreamweaver.

I know Dreamweaver is an unlikely tool for writing fiction, but it was actually exactly what I needed. I started out using an application called Scrivener. Scrivener is an excellent piece of software for both organizing and authoring, and I never had a single problem with it. But after completing my first draft, I decided I wanted to release Containment online under a Creative Commons License and on Amazon’s Digital Text Platform, both of which required the manuscript to be in HTML. So I exported to HTML from Scrivener, and started writing with Dreamweaver.

Just because I work for Adobe doesn’t mean I automatically choose Adobe solutions for everything. I’m a big believer is using the right and the best tool for the job, regardless of your affiliation, so I tried some other tools just to be sure I wasn’t missing anything. I found that Dreamweaver easily outperformed them all. (To be fair, I didn’t try Expressions Web since I usually use a Mac, so I don’t know how it compares to Dreamweaver.)

I was a little hesitant at first because I’ve always been a hand-coding kind of guy. I used to use Vim for all my coding, and I still use it for just about everything but ActionScript and Flex work. But when you’re writing creatively, you really just want the tool to get out of your way so you can focus on the content. I got in the habit of opening Dreamweaver, hitting F4 to close all the panels, then alt+command H to hide all my other windows. Initially I was constantly switching into code view to check on the HTML that Dreamweaver was generating since I have a deep mistrust for code generation in general, but everything Dreamweaver generated was perfect (granted everything I was doing was simple markup — I have not tried Dreamweaver yet for complex sites).

If you have stories, a novel, poems, or non-fiction that you want to share with the world, don’t keep waiting for the right time. Convert it into HTML, and put it online now. Not many of us get rich from writing — especially fiction — so you might as well give your work to the world and see what happens.