Customizing WebWorks
WebWorks has been created to be very flexible and easy to customize.
In this section I will try to explain how you can configure WW to suit you.
These are the things you can customize:
Adding own commands
It is very easy to add your own command.
This is what you do:
First rightclick with the mouse in a dockument.
Select Own Commands in the menu that pops up and click Add/Edit Own Commands.
Now you should see this window:

In the name field you type the name that will represent your function on the popup menu.
The code textbox is where you enter the code that should be added and you should also write @@ once where you want the selected text to be inserted.
If you don't write @@ any selected text will be replaced. Write %% where you want to start a new row, %% can be written as many times you want.
Now there are two text fields left for me to comment. In those you write commands or any other text you want to be added in the beginning and end of each row of the selected text in your dockument.
I've already added a couple of own commands to show how it works. All own commands are stored in the file owncom.txt. Click the link to view the file.
This file can be edited manually but it's more difficult.
Editing commands.txt.
The commands.tx file contains a list of common html tags. But now you probably wonder what it's used for.
This is the file that contains the html commands that can be completed by pressing CTRL+SPACE.
It works like this:
In a dockument write <A > and then you press CTRL+SPACE.
Now WebWorks scans commands.txt for the first command matching what you've started writing. Notice that i wrote first in bold, I did that because you should be aware of that
you can change the order of the commands in the file. But you will have to do that manually. This can be useful if you have two similar commands and you use one of them more often.
Then you could put that command before the other so you just have to write the beginning. My example should be completed to <A HREF="">.
Click here to view commands.txt.
Editing the formats.txt file.
Formats.txt is the file from where the format tool gets it´s commands. The format tool works allmost like an own command, with some exceptions. It can remove all html commands from a dockument or
convert them to upper or lowercase and it's easier to use. Now back to the format.txt file, every row in this file is added as a new item in the comboboxes on the format tool. The file is empty by default.
View formats.txt
Editing the default.htm template.
This is probably the easiest file to customize. Click the "Options" menu and then "Edit default template" to open default.htm and make the changes you want, save. Then open a new dockument in WebWorks and you will see that the new dockument is an exact copy of default.htm.
There is one exception though; the two @-characters (@@) will be removed and the cursor will be placed on that position in the new document. If there are no "@@" in default.htm the cursor will be positioned in the beginning of the document.
View default.htm
Editing css.txt.
Editing the css.txt file is a bit more advanced. This file is used by the CSS tool in WW. When the CSS tool is started it reads through this file and adds all commands, properties and units from the file to the comboboxes.
When you select a property the program reads another textfile, with the same name as the property you selected. That file contains all values belonging to the current property. So if you add a new property in css.txt then
you must also create a new textfile with the property´s name and put it in the CSS folder in the WebWorks directory.
Here is an example:
Somewhere below the line "<-- Properties: -->" you will find the property "clear".
If you go to the CSS folder and open clear.txt you can see all values belonging to the "clear" property.
View css.txt
Editing finds.txt and replaces.txt.
In finds.txt and replaces.txt the latest searched and replaced words will be stored. I recommend you to clear these two files sometimes because WebWorks won't do it. Else they will just grow and grow.
View finds.txt
View replaces.txt
Changing the settings.
The settings aren't stored in textfiles, instead they are stored in the windows registry. This means that the settings can only be changed from within WebWorks. To bring up the settings screen you can press F9 or
click on the Options-->Settings menu. Now you should see this window:

General tab:
Java compiler - The path and parameters to a javacompiler (if if you would like to be able to compile java-applets from within WebWorks).
Default linebreak - is the default format to use when you create a new document. Different operating systems use different types of linebreaks.
If you open a file created in Linux or MacOS with windows notepad you will see a big mess.
But WebWorks can handle these files, you won't notice any difference. You can change the fileformat at any time by clicking DOS format, UNIX format or MAC format under the Tools menu.
Default file extention - Hmm... could it be the default file extention when you save a document?
Default directory - When you open or save a file for the first time in WW, this will be the active directory.
Remember last directory - If checked the last directory will be the active directory when saving or opening files.
Button skin - Select a skin file that contains the information about the look of WebWorks.
Standard indent - What should be written when you press tab? Default is ofcourse a standard tab character.
HTML Colors tab:
Here you can choose wether you want to use colors or not. You can also choose which colors you want to use.
Note that the text color will be used as text color even if "use colors" is turned off.
Documents tab:
Nothing strange here. Choose which font, size and background color to use. In the "Do On Open" combobox you can let WebWorks change some things in the documents directly when you open them.
Go back!