Customizing the Objects Panel

In earlier chapters, we used the Objects panel to insert many built-in objects into an HTML document. You can add a custom icon to the Objects panel to insert any object. The Objects panel offers greater flexibility than library items, which insert HTML code only. To create a new object for the Objects panel, create an HTML document, including JavaScript that inserts your object into the current document.

Basing your new object on one of the existing objects in the Dreamweaver4/C onfiguration/Objects folder is your most convenient option. Within that folder are subfolders corresponding to the seven default categories of the Objects panel (Characters, Common, Forms, Frames, Head, Invisibles, and Special) plus a Tools folder for the Draw Layout Table and Draw Layout Cell tools that are always visible in the Objects panel

Tip

The subfolder in which an object file is placed determines the category under which it appears in the Objects panel. Items can be moved between folders, and folders can be renamed.

Search for “Creating a simple object” under Help Using Dreamweaver (F1) for an example of adding a simple object to the Objects panel. Example 19-3 shows the Button.htm file from the Configuration/Objects/Forms directory.

Example 19-3. A sample object definition file

<HTML><HEAD> <!-- Copyright 1999 Macromedia, Inc. All rights reserved. --> <TITLE>Insert Button</TITLE> <SCRIPT LANGUAGE="javascript" SRC="../../Shared/MM/Scripts/CMN/docInfo.js"> </SCRIPT> <SCRIPT ...

Get Dreamweaver in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.