Quick Tag Editor functions

 < Day Day Up > 

Quick Tag Editor functions navigate through the tags within and surrounding the current selection. They remove any tag in the hierarchy, wrap the selection inside a new tag, and show the Quick Tag Editor to let the user edit specific attributes for the tag.

dom.selectChild()

Availability

Dreamweaver 3.

Description

Selects a child of the current selection. Calling this function is equivalent to selecting the next tag to the right in the tag selector at the bottom of the Document window.

Arguments

None.

Returns

Nothing.

dom.selectParent()

Availability

Dreamweaver 3.

Description

Selects the parent of the current selection. Calling this function is equivalent to selecting the next tag to the left in the tag selector at the bottom of the Document window.

Arguments

None.

Returns

Nothing.

dom.stripTag()

Availability

Dreamweaver 3.

Description

Removes the tag from around the current selection, leaving any contents. If the selection has no tags or contains more than one tag, Dreamweaver reports an error.

Arguments

None.

Returns

Nothing.

dom.wrapTag()

Availability

Dreamweaver 3.

Description

Wraps the specified tag around the current selection. If the selection is unbalanced, Dreamweaver reports an error.

Arguments

 startTag 

  • The startTag argument is the source that is associated with the opening tag.

Returns

Nothing.

Example

The following code wraps a link around the current selection:

 var theDOM = dw.getDocumentDOM(); var theSel = theDOM.getSelectedNode(); if (theSel.nodeType == Node.TEXT_NODE){   theDOM.wrapTag('<a href="foo.html">'); } 

dreamweaver.showQuickTagEditor()

Availability

Dreamweaver 3.

Description

Displays the Quick Tag Editor for the current selection.

Arguments

 {nearWhat}, {mode} 

  • The optional nearWhat argument, if specified, must be either "selection" or "tag selector". If this argument is omitted, the default value is "selection".

  • The optional mode argument, if specified, must be "default", "wrap", "insert", or "edit". If mode is "default" or omitted, Dreamweaver uses heuristics to determine the mode to use for the current selection. The mode argument is ignored if nearWhat is "tag selector".

Returns

Nothing.

     < Day Day Up > 


    Developing Extensions for Macromedia Dreamweaver 8
    Developing Extensions for Macromedia Dreamweaver 8
    ISBN: 0321395409
    EAN: 2147483647
    Year: 2005
    Pages: 282

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net