Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
SeleniumHQ
GitHub Repository: SeleniumHQ/Selenium
Path: blob/trunk/third_party/closure/goog/editor/command.js
4087 views
1
/**
2
* @license
3
* Copyright The Closure Library Authors.
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
/**
8
* @fileoverview Commands that the editor can execute.
9
* @see ../demos/editor/editor.html
10
*/
11
goog.provide('goog.editor.Command');
12
13
14
/**
15
* Commands that the editor can execute via execCommand or queryCommandValue.
16
* @enum {string}
17
*/
18
goog.editor.Command = {
19
// Prepend all the strings of built in execCommands with a plus to ensure
20
// that there's no conflict if a client wants to use the
21
// browser's execCommand.
22
UNDO: '+undo',
23
REDO: '+redo',
24
LINK: '+link',
25
FORMAT_BLOCK: '+formatBlock',
26
INDENT: '+indent',
27
OUTDENT: '+outdent',
28
REMOVE_FORMAT: '+removeFormat',
29
STRIKE_THROUGH: '+strikeThrough',
30
HORIZONTAL_RULE: '+insertHorizontalRule',
31
SUBSCRIPT: '+subscript',
32
SUPERSCRIPT: '+superscript',
33
UNDERLINE: '+underline',
34
BOLD: '+bold',
35
ITALIC: '+italic',
36
FONT_SIZE: '+fontSize',
37
FONT_FACE: '+fontName',
38
FONT_COLOR: '+foreColor',
39
EMOTICON: '+emoticon',
40
EQUATION: '+equation',
41
BACKGROUND_COLOR: '+backColor',
42
ORDERED_LIST: '+insertOrderedList',
43
UNORDERED_LIST: '+insertUnorderedList',
44
TABLE: '+table',
45
JUSTIFY_CENTER: '+justifyCenter',
46
JUSTIFY_FULL: '+justifyFull',
47
JUSTIFY_RIGHT: '+justifyRight',
48
JUSTIFY_LEFT: '+justifyLeft',
49
BLOCKQUOTE: '+BLOCKQUOTE', // This is a nodename. Should be all caps.
50
DIR_LTR: 'ltr', // should be exactly 'ltr' as it becomes dir attribute value
51
DIR_RTL: 'rtl', // same here
52
IMAGE: 'image',
53
EDIT_HTML: 'editHtml',
54
UPDATE_LINK_BUBBLE: 'updateLinkBubble',
55
56
// queryCommandValue only: returns the default tag name used in the field.
57
// DIV should be considered the default if no plugin responds.
58
DEFAULT_TAG: '+defaultTag',
59
60
// TODO(nicksantos): Try to give clients an API so that they don't need
61
// these execCommands.
62
CLEAR_LOREM: 'clearlorem',
63
UPDATE_LOREM: 'updatelorem',
64
USING_LOREM: 'usinglorem',
65
66
// Modal editor commands (usually dialogs).
67
MODAL_LINK_EDITOR: 'link'
68
};
69
70