MACROMEDIA DREAMWEAVER 8-EXTENDING DREAMWEAVER Manual page 151

Extending dreamweaver
Table of Contents

Advertisement

Creating the HTML file
The title of the object is specified between the opening and closing
specify that the scripting language is JavaScript.
To create the HTML file:
1.
Create a new blank file.
2.
Add the following code:
<html>
<head>
<title>Strikethrough</title>
<script language="javascript">
</script>
</head>
<body>
</body>
</html>
3.
Save the file as Strikethrough.htm in the Configuration/Objects/Text folder.
Adding the JavaScript functions
In this example, the JavaScript functions define the behavior and insert code for the
Strikethrough object. You must place all the API functions in the
existing object files, such as Configuration/Objects/Text/Em.htm, follow a similar pattern of
functions and comments.
The first function the object definition file uses is i
Design view needs to be synchronized to the existing Code view before execution continues.
However, because the Superscript object might be used with many other objects in the Code
view, it does not require a forced synchronization.
To add the isDOMRequired() function:
1.
In the
section of the Strikethrough.htm file, between the opening and closing
HEAD
tags, add the following function:
<script language="javascript">
function isDOMRequired() {
// Return false, indicating that this object is available in Code
view.
return false;
}
</script>
2.
Save the file.
title
section of the file. The
HEAD
, which tells whether the
sDOMRequired()
A simple insert object example
tags. You also
script
151

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER 8-EXTENDING DREAMWEAVER and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Dreamweaver 8

Table of Contents