Yahoo! UI Library

editor  3.2.0pr1

Yahoo! UI Library > editor > Plugin.ExecCommand
Search:
 
Filters

Class Plugin.ExecCommand - extends Base

Plugin for the frame module to handle execCommands for Editor

Constructor

Plugin.ExecCommand ( )

Properties

_inst - private object

An internal reference to the instance of the frame plugged into.

COMMANDS - static object

Static object literal of execCommand overrides

NAME - static object

execCommand

NS - static object

exec

Properties inherited from Attribute:

Properties inherited from Base:

Methods

_command

private void _command ( action , value )
The private version of execCommand that doesn't filter for overrides.
Parameters:
action <String> The action to perform (bold, italic, fontname)
value <String> The optional value (helvetica)

command

Node/NodeList command ( action , value )
Execute a command on the frame's document.
Parameters:
action <String> The action to perform (bold, italic, fontname)
value <String> The optional value (helvetica)
Returns: Node/NodeList
Should return the Node/Nodelist affected

COMMANDS.addclass

static NodeList COMMANDS.addclass ( cmd , cls )
Add a class to all of the elements in the selection
Parameters:
cmd <String> The command executed: addclass
cls <String> The className to add
Returns: NodeList
NodeList of the items touched by this command.

COMMANDS.inserthtml

static Node COMMANDS.inserthtml ( cmd , html )
Inserts the provided HTML at the cursor, should be a single element.
Parameters:
cmd <String> The command executed: inserthtml
html <String> The html to insert
Returns: Node
Node instance of the item touched by this command.

COMMANDS.insertimage

static Node COMMANDS.insertimage ( cmd , img )
Inserts an image at the cursor position
Parameters:
cmd <String> The command executed: insertimage
img <String> The url of the image to be inserted
Returns: Node
Node instance of the item touched by this command.

COMMANDS.removeclass

static NodeList COMMANDS.removeclass ( cmd , cls )
Remove a class from all of the elements in the selection
Parameters:
cmd <String> The command executed: removeclass
cls <String> The className to remove
Returns: NodeList
NodeList of the items touched by this command.

COMMANDS.wrap

static NodeList COMMANDS.wrap ( cmd , tag )
Wraps the content with a new element of type (tag)
Parameters:
cmd <String> The command executed: wrap
tag <String> The tag to wrap the selection with
Returns: NodeList
NodeList of the items touched by this command.

getInstance

YUI getInstance ( )
Get's the instance of YUI bound to the parent frame
Returns: YUI
The YUI instance bound to the parent frame

Events inherited from Base:

Configuration attributes inherited from Base:


Copyright © 2010 Yahoo! Inc. All rights reserved.