TOC
BACK
FORWARD
 

Using Netscape Composer

- 9 -
What You Need to Know About Composer Plug-Ins

  • Learn about Composer plug-ins This chapter shows you what Composer plug-ins are and how they add features to Composer. 
  • Download and install these samples Composer comes with a few plug-ins, but you can download several more from Netscape, directly. 
  • Composer plug-ins are easy to use Each plug-in works a bit differently, but you get at all of them the same way: the Tools menu. 
Netscape's Composer plug-in technology is exciting stuff. Plug-in technology does for HTML editors what River Dance does for the Irish jig. It makes very complicated and advanced HTML features accessible to the average (and below average) HTML author. You might never have imagined building your own framed Web site, for example, but you can do it easily with a plug-in.

A Composer plug-in is a component (a thingy or a widget, if you like) that you add to Composer. You can think of plug-ins like you think of the components of your stereo system. When you want to add features to your stereo, such as the ability to play music CDs, you drop in another component, like a CD player. When you want to add a feature to Composer, you drop in a plug-in that provides that feature. 

Plugging In to Plug-Ins

Composer plug-ins work with the HTML in your Web page; but, they do their work outside of Composer. You need to understand this concept, so I'll walk you through it step- by-step. Here's what happens when you start a plug-in: 
1. Composer runs the plug-in and hands it all of the HTML that makes up your Web page.

 

 

2.You interact with the plug-in in its own window. That is, the plug-in will open its own window outside of Composer's window (see Figure 9.1). 

FIG. 9.1
Sometimes a plug-in's window will open behind Composer's main window; just do a task switch to it.
3. The plug-in changes the HTML to reflect your input as you interact with it. 
4.The plug-in hands all of your Web page's HTML back to Composer when you close it, so that you can continue editing the Web page. 
Because of the way Composer plug-ins work, you'll notice an interesting side effect. Because Composer plug-ins don't work within Composer, Composer won't always display the Web page correctly after the plug-in has done its trick. In cases like these, you'll see the HTML tag icons that represent an HTML tag Composer can't handle. For example, Composer doesn't know how to display the <LAYER> tag. If you use a plug-in to add layers to your Web page, Composer won't display the layers correctly; it'll display the HTML tag icons, instead. 

Downloading Sample Composer Plug-Ins

You're bound to be asking yourself what kinds of Composer plug-ins exist. Asking that question is a bit like asking yourself how big the universe is: It's growing all the time. That's because anyone and everyone who can write a Java applet can create a Composer plug-in. So, you should expect to find a variety of sources for plug-ins. Try searching your favorite Web index, for example, for interesting and useful plug-ins.

Until third-party Composer plug-ins start popping up here and there, you can download and try the handful of plug-ins that Netscape provides. The sections that follow describe the types of plug-ins you'll find on Netscape's Web site, as well as how to download and install them. 

Where to Find Plug-Ins

You'll find Netscape's Composer plug-ins at http://developer.netscape.com/library/examples/plugins/composer/index.html. Table 9.1 describes each file that you can download from this Web page and the plug-ins that each file contains. 

Table 9.1 Composer Plug-Ins from Netscape

Plug-In Name Description
cpTest.zip
Colorize Makes selected text very colorful
Document Info Displays document statistics
Edit HTML Allows you to edit the raw HTML
Netscape Button Adds a Netscape Now button
Small Caps Changes font style to small caps
Tableize Makes a table from selected text
Tag Stripper Removes all HTML tags from selection
Test Applet Adds a NervousText Java applet
cpMapEdt.zip
Image Map Editor Creates client-side image maps
cpFrames.zip
Frame Editor Creates framesets and frames
cpGIFEnc.zip
GIF Encoder Converts images to GIF89a
cpInSpec.zip
Special Character Inserts a special character
cpTOC.zip
Table of Contents Generates a table of contents

Downloading and Installing a Plug-In

Each time Netscape Communicator starts, it looks in the plug-in folder for any plug-in files. Each plug-in is stored in a ZIP file (a compressed file that you decompress using a program such as WinZip). You don't have to decompress them, however, just drop them in the Netscape plug-in folder; that's all. Need instructions? OK. 
1. Open the Web page that contains the Composer plug-in you want to download. 

2.Click the link to the plug-in's ZIP file, and, after a few moments, you'll see the Unknown File Type dialog box shown in Figure 9.2. 
FIG. 9.2
If you don't see this dialog, right-click the link and choose Save Target As from the pop-up menu; then, go to Step 3.
3. Click Save to save the plug-in to your plug-in folder, and you'll see the renowned Save As dialog box. 

4.Type the path to the Netscape plug-in folder in the space provided. Alternatively, click browse your computer for the plug-in folder. Table 9.2 shows the folder for which you're looking, depending on the platform you use. 

Table 9.2 Netscape Plug-In Folders

Platform Folder
Mac Plug-ins, directly under the Netscape folder
Windows Plugins, directly under the Netscape folder
UNIX /usr/local/netscape/plugins
5. Click Save, and Netscape will download the file to the plug-in folder. 

6 Close and restart Netscape Communicator. 

Using a Composer Plug-In

Each time you start Composer, it takes a peek into the plug-in folder and loads each plug-in file it finds. Each file contains a single plug-in that adds a menu option to Composer's Tools menu. Menu options specific to each plug-in are on that plug-in's submenu. Figure 9.3 shows you what the Tools menu looks like after installing the files shown in Table 9.1. 

FIG. 9.3
Plug-ins that come with Composer are above the dividing line, and plug-ins that you install are below it.


NOTE: Most plug-ins drop a menu option on the Tools menu. These plug-ins are called menu option plug-ins. Other plug-ins, called event handler plug-ins, work behind the scenes. You don't interact with them at all. 
Because Composer plug-ins come from many different sources, each and every plug-in works a bit differently. Thus, I can't possibly tell you how to use every plug-in. Working through an example, however, will give you a general idea of how plug-ins work and how you use them. 
1. Download and install cpTest.zip as described in "Downloading Sample Composer Plug-Ins," earlier in this chapter. This plug-in contains several useful text-editing features. 

2.Restart Composer, and type some text into the blank Web page. If you're at a loss for ideas, type this paragraph in the Composer window. 
3.Choose Tools from Composer's main menu. You'll notice a few new menu options: Character Tools, HTML Tools, and Insert. 
4.Choose Character Tools, and you'll see a handful of submenu options: Colorize, Small Caps, Tableize, and Tag Stripper. 
5.Select the text you typed in the Composer window, and choose Tools, Character Tools, Tableize from Composer's main menu. The plug-in will then enclose that text within a table, as shown in Figure 9.4. 
FIG. 9.4
You'll have to use Composer's table features to add rows and columns to this table. See Chapter 7, "Setting Up Tables," to learn how.
6. Select a few words of the text you typed in the Composer window, and choose Tools, Character Tools, Colorize, and the plug-in will add the HTML tags necessary to make the text look like it's fading from one color to another. 

Summary

The only way to know for sure what a plug-in does is to experiment with it. By experimenting with a plug-in, you better learn how to use it in your own Web pages.

The chapters that follow teach you how to add advanced HTML features to your Web pages. For example, Chapter 11, "Framing Your Web Site," shows you how to use frames. You don't have to know all the complicated HTML tags in order to use frames, however, you just need to know how to use the Frames plug-in. Thus it is with the other chapters in this part of the book. Each shows you how to add advanced features to your Web page without you having to know a lick of the HTML involved. 

TOCBACKFORWARDHOME