15.08.2013 Views

Ektron® eWebEditPro Developer's Reference Guide

Ektron® eWebEditPro Developer's Reference Guide

Ektron® eWebEditPro Developer's Reference Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Defining the Toolbar<br />

10. Place the following JavaScript on the page that displays the editor between<br />

the body’s script tags. You can enter the function above or below the line that<br />

invokes the editor.<br />

NOTE This section does not explain how to create custom commands. See ”Custom<br />

Commands” on page 215 for that procedure.<br />

function <strong>eWebEditPro</strong>ExecCommand(sEditorName, strCmdName, strTextData, lData)<br />

{<br />

if ("jsconame" == strCmdName)<br />

{<br />

<strong>eWebEditPro</strong>.instances[sEditorName].editor.pasteHTML("Widgets, Inc");<br />

}<br />

else if ("jscoaddress" == strCmdName)<br />

{<br />

<strong>eWebEditPro</strong>.instances[sEditorName].editor.pasteHTML("1 Main Street, New York, New York");<br />

}<br />

else if ("jstcotelnum" == strCmdName)<br />

{<br />

<strong>eWebEditPro</strong>.instances[sEditorName].editor.pasteHTML("1-800-111-2222");<br />

}<br />

}<br />

Users will see the new toolbar menu arrangement the next time they sign on.<br />

Removing a Toolbar Button or Dropdown List<br />

NOTE This is only element for which you cannot set the enabled property to “false” so<br />

that the editor will ignore its values.<br />

1. Within the interface section of the configuration data, move to the definition of<br />

the toolbar menu that you want to modify.<br />

2. Move to the item that you want to remove.<br />

3. To permanently remove the button, select the entire line and press .<br />

To temporarily remove the button, surround it with the characters that your<br />

xml editor uses to "comment out" text that is not executable code.<br />

Users will see the new toolbar menu arrangement the next time they sign on.<br />

Rearranging Buttons/Dropdown Lists on a Toolbar Menu<br />

Buttons and dropdown lists appear on a toolbar menu in the sequence in which<br />

they are entered into the configuration data. For example, the following toolbar<br />

menu definition would create this menu .<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!