Note: Because
dom.applyCharacterMarkup()
API function for font color changes. (For more information, see
Reference).
2
Save the file as Strikethrough.js.
Next, in the Strikethrough.htm file, you add the form. The form for this example is a simple check box that calls the
function when the user clicks on it. You use the
fontColorRed()
layout control (otherwise, the dialog box might wrap words or size awkwardly).
To add the form:
After the
tag, add the following code:
1
body
<form>
<table border="0" height="100" width="100">
<tr valign="baseline">
<td align="left" nowrap>
<input type="checkbox" name="red" onClick=fontColorRed()>Red text</input>
</td>
</tr>
</table>
</form>
Save the file as Strikethrough.htm.
2
Reload the extensions (see "Reloading extensions" on page 74).
3
To test the dialog box:
Select the Red Text check box.
1
doesn't support font color changes, you need to find the appropriate
dom.applyFontMarkup()
tag to define your form, and the table tag for
form
DREAMWEAVER CS3
Extending Dreamweaver
in the Dreamweaver API
112