Class MozileWrapCommand
Object
|
+--MozileCommand
|
+--MozileWrapCommand
-
Direct Known Subclasses:
-
MozileStyleCommand
- class
MozileWrapCommand
- extends MozileCommand
Defined in XHTMLBasic.js
Field Summary |
Object |
mode
Mozile Wrap Command - Mode -
Selects the way in which this command operates. |
Object |
tag
Mozile Wrap Command - Tag -
The name of the element which will be the wrapper. |
<static> Object |
superclass
|
Fields inherited from class MozileCommand |
type, id, label, tooltip, image, accesskey, accelerator, namespace, debugLevel, button, menuitem
|
Method Summary |
Object
|
command(event)
Mozile Wrap Command - Command -
Behaves according to the mode.
|
Object
|
createMenuitem()
Mozile Wrap Command - Create Menuitem -
Creates an XUL menuitem element for this command.
|
Object
|
isActive()
Mozile Wrap Command - Is Active -
Checks to see if the current node has a parent which matches this.tag.
|
Object
|
unwrapRange(container, range, elementTemplate)
Mozile Wrap Command - Unwrap Range -
Given a range which does not span blocks, remove the range from the container which used to hold it, this removing it from the scope of the this.tag element.
|
Object
|
wrapBlock(block, element)
Mozile Wrap Command - Wrap Block -
Extract the contents of the given block, and inserts them within the given element which is made to be a child of the block.
|
Object
|
wrapInline(range, element)
Mozile Wrap Command - Wrap Inline -
Wraps a range (which does not span blocks) inside the given element.
|
Object
|
wrapRange(range, elementTemplate)
Mozile Wrap Command - Wrap Range -
Wraps an entire range (which might span multiple blocks) in copies of the given elementTemplate.
|
mode
Object mode
Mozile Wrap Command - Mode -
Selects the way in which this command operates. Can be "inline", "toggle", or "block".
tag
Object tag
Mozile Wrap Command - Tag -
The name of the element which will be the wrapper.
superclass
<static> Object superclass
MozileWrapCommand
MozileWrapCommand()
command
Object command(event)
Mozile Wrap Command - Command -
Behaves according to the mode. For "inline" it wraps the current selection with this.tag. In the case that the selection spans multiple blocks, it wraps the whole range of the selection. "toggle" behaves like "inline", except that it will unwrap the current selection if it is already wrapped. The "block" mode wraps the selection in a block level element.
Parameters:
event
- The event which triggered this command.
createMenuitem
Object createMenuitem()
Mozile Wrap Command - Create Menuitem -
Creates an XUL menuitem element for this command.
Returns:
The new menuitem element.
isActive
Object isActive()
Mozile Wrap Command - Is Active -
Checks to see if the current node has a parent which matches this.tag.
Returns:
True of the selection has a parent matching this.tag, false otherwise.
unwrapRange
Object unwrapRange(container, range, elementTemplate)
Mozile Wrap Command - Unwrap Range -
Given a range which does not span blocks, remove the range from the container which used to hold it, this removing it from the scope of the this.tag element.
Parameters:
container
- The container element with name this.tag from which the range wil be removed.
range
- The range to be unwrapped.
elementTemplate
- The element which will be cloned and used to wrap the block.
wrapBlock
Object wrapBlock(block, element)
Mozile Wrap Command - Wrap Block -
Extract the contents of the given block, and inserts them within the given element which is made to be a child of the block.
Parameters:
block
- The block to be wrapped.
element
- The element with which to wrap the block.
wrapInline
Object wrapInline(range, element)
Mozile Wrap Command - Wrap Inline -
Wraps a range (which does not span blocks) inside the given element.
Parameters:
range
- The range to be wrapped.
element
- The element with which to wrap the block.
wrapRange
Object wrapRange(range, elementTemplate)
Mozile Wrap Command - Wrap Range -
Wraps an entire range (which might span multiple blocks) in copies of the given elementTemplate. This involves calls to wrapBlock and wrapInline.
Parameters:
range
- The range to be wrapped.
elementTemplae
- The element which will be cloned and used to wrap the block.
Documentation generated by
JSDoc on Wed Oct 19 19:25:33 2005