MAIN | FAQ1 | FAQ2 | SUGGEST | DESIGNERS | CONTACT
Auction Writer

Clickers

AuctionWriter includes a set of shortcut buttons on the main edit screen. Each button, called a "clicker," can be used for quick access to snippets of text, HTML fragments or AuctionWriter features. Users with an understanding of Javascript can even create expanded tools for the editor and assign them to a clicker for easy access.

To execute short scripts, use the special token AW_CMD=. This token tells the clicker handler to evaluate the content as a script rather than just inset it into your document. Commands prepared this way are executed with the JS 'eval()' statement and are subject to the normal issues of nested quotes, reserved words. ETC. Some error checking is done by the system but you should also enable Javascript errors for your browser to help with trouble-shooting.

The JS variable mainForm is an alias for the main form element of the editor. You can use mainForm to reveal data for most of the information about the document being edited.

Example: mainForm.content refers to the text in the edit window so you might construct a "clicker" that would automatically change the location of images in your document from the AuctionWriter temporary URL to the URL of your permanent host -

AW_CMD=var aw="/auctionwriter.com/imgs/temp"; mainForm.content.value=mainForm.content.value.replace(/aw/g,"yourhost.com/yourpath");

In addition, several internal functions can be assigned to clickers just by invoking internal calls. Here are some examples: (all items are case-sensetive)
Action Clicker Code Notes
Display the Table Construction Tool AW_CMD=showTCS();
Display the Image Upload dialog AW_CMD=showUPL();
Display the Color Diver Tool AW_CMD=showDIVER(); The current document must contain a valid image URL
Display the Table Construction Tool AW_CMD=showTCS();
Display stats for the current document AW_CMD=docSTAT();
Validate the content with the W3.org validator AW_CMD=valid_W3();
Encode the html brackets so the code can be posted on a discussion board AW_CMD=encodeit();
Strip all HTML from the content, leaving only the text. AW_CMD=stripit();
embed a link to a related documentt. <comment>AW_RELATED_DOC=###</comment>

Q.

Q.