Editing the insertbar.xml file

Next, you need to edit the insertbar.xml file so Adobe Dreamweaver can associate these two items with the Insert bar interface.

NOTE

Before you edit the insertbar.xml file, you might want to copy the original one as insertbar.xml.bak, so you have a backup.

The code within the insertbar.xml file identifies all the existing objects on the Insert bar

  • Each category tag in the XML file creates a category in the interface.
  • Each menubutton tag creates a pop-up menu on the Insert bar.
  • Each button tag in the XML file places an icon on the Insert bar and connects it to the proper HTML file or function.

To add the new object to the Insert bar:

  1. Find the following line near the beginning of the inserbar.xml file:
    <category id="DW_Insertbar_Common" MMString:name="insertbar/category/common" folder="Common">

    This line identifies the beginning of the Common category on the Insert bar.

  2. Start a new line after the category tag; then insert the button tag and assign it the id, image, and file attributes for the Strikethrough object.

    The ID must be a unique name for the button (following standard naming conventions, use DW_Text_Strikethrough for this object). The image and file attributes simply tell Adobe Dreamweaver the location of the supporting files, as shown here:

    <button id="DW_Text_Strikethrough" image="Text\Strikethrough.gif" file="Text\Strikethrough.htm"/>
  3. Save the insertbar.xml file.
  4. Reload the extensions (see ).

The new object appears at the beginning of the Common category on the Insert bar, as shown in the following figure:

This is a picture of the feature being described.