Custom HTML and JavaScript code can be added to your pages using the Custom Script Assistant in WebEasy Professional. This functionality is not available in WebEasy.


Solution


The Custom Script Assistant can be opened by selecting "Custom Script Assistant" from the "Tools" menu. It allows HTML and JavaScript code to be added in four different ways:


1) Attached to an item (image or text) at a specific location within your page.
2) Directly after the <BODY> tag, but before any other items on your page.
3) As attributes of the <BODY> tag itself.
4) Between the <HEAD> and <BODY> tags, as JavaScript code.


To add custom HTML code at a specific location within your page:


1) Insert an image into your page in the position where you want the custom code to be.
2) Select the image.
3) From the "Tools" menu select "Custom Script Assistant"
4) In the window that appears, make sure the "Object Events" button is selected.
5) Type your custom HTML code in the text box labeled "Contents", or press CTRL-V to paste it.
6) Click "OK".


After doing this the image acts as a placeholder for your custom HTML code. When you preview the site, the image will be replaced by your code. You may need to resize the image, depending on the code you have entered. Note that if you use copy-and-paste to duplicate the placeholder, you will need to manually add the script to the new placeholder image - it will not be copied automatically.


This technique can also be used to add attributes to HTML tags, for example if you added the code BORDER=2 to an image, when you preview your site the image will have a 2-pixel wide border.


To add custom HTML code directly after the <BODY> tag, but before any other items on your page:


1) Make sure there are no items selected on your page.
2) From the "Tools" menu select "Custom Script Assistant"
3) In the window that appears, make sure the "Body Elements" button is selected.
4) Type your custom HTML code in the text box labeled "Contents", or press CTRL-V to paste it.
5) Click "OK".


To add custom attributes to the <BODY> tag itself:


1) Make sure there are no items selected on your page.
2) From the "Tools" menu select "Custom Script Assistant"
3) In the window that appears, make sure the "Body Events" button is selected.
4) Type your custom attributes in the text box labeled "Contents", or press CTRL-V to paste it.
5) Click "OK".


To add JavaScript code Between the <HEAD> and <BODY> tags:


1) Make sure there are no items selected on your page.
2) From the "Tools" menu select "Custom Script Assistant"
3) In the window that appears, make sure the "Source Code" button is selected.
4) Type your custom attributes in the text box labeled "Contents", or press CTRL-V to paste it.
5) Click "OK".


In this case, only pure JavaScript code can be entered, as WebEasy will automatically generate <SCRIPT> tags for you.

The Keywords List


The Keywords are a list of commonly used HTML and JavaScript keywords. If you select one, it will be added to your script in the Contents box. This list serves no other purpose - it does not matter what is currently selected in the list when you are using the Custom Script Assistant.