Path: blob/trunk/third_party/closure/goog/editor/command.js
4511 views
/**1* @license2* Copyright The Closure Library Authors.3* SPDX-License-Identifier: Apache-2.04*/56/**7* @fileoverview Commands that the editor can execute.8* @see ../demos/editor/editor.html9*/10goog.provide('goog.editor.Command');111213/**14* Commands that the editor can execute via execCommand or queryCommandValue.15* @enum {string}16*/17goog.editor.Command = {18// Prepend all the strings of built in execCommands with a plus to ensure19// that there's no conflict if a client wants to use the20// browser's execCommand.21UNDO: '+undo',22REDO: '+redo',23LINK: '+link',24FORMAT_BLOCK: '+formatBlock',25INDENT: '+indent',26OUTDENT: '+outdent',27REMOVE_FORMAT: '+removeFormat',28STRIKE_THROUGH: '+strikeThrough',29HORIZONTAL_RULE: '+insertHorizontalRule',30SUBSCRIPT: '+subscript',31SUPERSCRIPT: '+superscript',32UNDERLINE: '+underline',33BOLD: '+bold',34ITALIC: '+italic',35FONT_SIZE: '+fontSize',36FONT_FACE: '+fontName',37FONT_COLOR: '+foreColor',38EMOTICON: '+emoticon',39EQUATION: '+equation',40BACKGROUND_COLOR: '+backColor',41ORDERED_LIST: '+insertOrderedList',42UNORDERED_LIST: '+insertUnorderedList',43TABLE: '+table',44JUSTIFY_CENTER: '+justifyCenter',45JUSTIFY_FULL: '+justifyFull',46JUSTIFY_RIGHT: '+justifyRight',47JUSTIFY_LEFT: '+justifyLeft',48BLOCKQUOTE: '+BLOCKQUOTE', // This is a nodename. Should be all caps.49DIR_LTR: 'ltr', // should be exactly 'ltr' as it becomes dir attribute value50DIR_RTL: 'rtl', // same here51IMAGE: 'image',52EDIT_HTML: 'editHtml',53UPDATE_LINK_BUBBLE: 'updateLinkBubble',5455// queryCommandValue only: returns the default tag name used in the field.56// DIV should be considered the default if no plugin responds.57DEFAULT_TAG: '+defaultTag',5859// TODO(nicksantos): Try to give clients an API so that they don't need60// these execCommands.61CLEAR_LOREM: 'clearlorem',62UPDATE_LOREM: 'updatelorem',63USING_LOREM: 'usinglorem',6465// Modal editor commands (usually dialogs).66MODAL_LINK_EDITOR: 'link'67};686970