exec-command-debug.js revision dbf2c770f8178b12e8fe3c36bfa29df58ef13959
1265N/A * Plugin for the frame module to handle execCommands for Editor 1244N/A * Plugin for the frame module to handle execCommands for Editor * An internal reference to the instance of the frame plugged into. * Execute a command on the frame's document. * @param {String} action The action to perform (bold, italic, fontname) * @param {String} value The optional value (helvetica) Y.
log(
'execCommand(' +
action +
'): "' +
value +
'"',
'info',
'exec-command');
* The private version of execCommand that doesn't filter for overrides. * @param {String} action The action to perform (bold, italic, fontname) * @param {String} value The optional value (helvetica) Y.
log(
'Internal execCommand(' +
action +
'): "' +
value +
'"',
'info',
'exec-command');
* Get's the instance of YUI bound to the parent frame * @return {YUI} The YUI instance bound to the parent frame * Static object literal of execCommand overrides * Wraps the content with a new element of type (tag) * @param {String} cmd The command executed: wrap * @param {String} tag The tag to wrap the selection with * @return {NodeList} NodeList of the items touched by this command. * Inserts the provided HTML at the cursor, should be a single element. * @method COMMANDS.inserthtml * @param {String} cmd The command executed: inserthtml * @param {String} html The html to insert * @return {Node} Node instance of the item touched by this command. * Inserts an image at the cursor position * @method COMMANDS.insertimage * @param {String} cmd The command executed: insertimage * @param {String} img The url of the image to be inserted * @return {Node} Node instance of the item touched by this command. return this.
command(
'inserthtml',
'<img src="' +
img +
'">');
* Add a class to all of the elements in the selection * @method COMMANDS.addclass * @param {String} cmd The command executed: addclass * @param {String} cls The className to add * @return {NodeList} NodeList of the items touched by this command. * Remove a class from all of the elements in the selection * @method COMMANDS.removeclass * @param {String} cmd The command executed: removeclass * @param {String} cls The className to remove * @return {NodeList} NodeList of the items touched by this command. blocks =
'p,div,li,body';
//More??