aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/rich-text-editor/rich-text-editor.reel/rich-text-editor-base.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/montage/ui/rich-text-editor/rich-text-editor.reel/rich-text-editor-base.js')
-rw-r--r--node_modules/montage/ui/rich-text-editor/rich-text-editor.reel/rich-text-editor-base.js1706
1 files changed, 1706 insertions, 0 deletions
diff --git a/node_modules/montage/ui/rich-text-editor/rich-text-editor.reel/rich-text-editor-base.js b/node_modules/montage/ui/rich-text-editor/rich-text-editor.reel/rich-text-editor-base.js
new file mode 100644
index 00000000..e92da424
--- /dev/null
+++ b/node_modules/montage/ui/rich-text-editor/rich-text-editor.reel/rich-text-editor-base.js
@@ -0,0 +1,1706 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6/**
7 @module "montage/ui/rich-text-editor.reel"
8 @requires montage/core/core
9*/
10var Montage = require("montage").Montage,
11 Component = require("ui/component").Component,
12 MutableEvent = require("core/event/mutable-event").MutableEvent,
13 Sanitizer = require("./rich-text-sanitizer").Sanitizer,
14 RichTextLinkPopup = require("../overlays/rich-text-linkpopup.reel").RichTextLinkPopup,
15 RichTextResizer = require("../overlays/rich-text-resizer.reel").RichTextResizer,
16 defaultEventManager = require("core/event/event-manager").defaultEventManager,
17 defaultUndoManager = require("core/undo-manager").defaultUndoManager;
18
19/**
20 @class module:"montage/ui/rich-text-editor.reel".RichTextEditorBase
21 @extends module:montage/ui/component.Component
22*/
23exports.RichTextEditorBase = Montage.create(Component,/** @lends module:"montage/ui/rich-text-editor.reel".RichTextEditor# */ {
24
25 /**
26 Description TODO
27 @private
28 */
29 _overlays: {
30 enumerable: false,
31 value: undefined
32 },
33
34 /**
35 Description TODO
36 @private
37 */
38 _overlaySlot: {
39 enumerable: false,
40 value: null
41 },
42
43 /**
44 Description TODO
45 @private
46 */
47 _activeOverlay: {
48 enumerable: false,
49 value: null
50 },
51
52 /**
53 Description TODO
54 @private
55 */
56 _innerElement: {
57 enumerable: false,
58 value: null
59 },
60
61 /**
62 Description TODO
63 @private
64 */
65 _undoManager: {
66 enumerable: false,
67 value: undefined
68 },
69
70 /**
71 Description TODO
72 @private
73 */
74 _isTyping: {
75 enumerable: false,
76 value: false
77 },
78
79 /**
80 Description TODO
81 @private
82 */
83 _startTyping: {
84 enumerable: false,
85 value: function() {
86 if (this._doingUndoRedo) {
87 this._isTyping = false;
88 return;
89 } else if (!this._isTyping) {
90 this._isTyping = true;
91 if (this.undoManager) {
92 this.undoManager.add("Typing", this._undo, this, "Typing", this._innerElement);
93 }
94 }
95 }
96 },
97
98 /**
99 Description TODO
100 @private
101 */
102 _stopTyping: {
103 enumerable: false,
104 value: function() {
105 if (this._isTyping) {
106 this._isTyping = false;
107 }
108 }
109 },
110
111 /**
112 Description TODO
113 @private
114 */
115 _hasSelectionChangeEvent: {
116 enumerable: false,
117 value: null // Need to be preset to null, will be set to true or false later on
118 },
119
120 /**
121 Description TODO
122 @private
123 */
124 _uniqueId: {
125 enumerable: false,
126 value: Math.floor(Math.random() * 1000) + "-" + Math.floor(Math.random() * 1000)
127 },
128
129 /**
130 Description TODO
131 @private
132 */
133 _contentInitialized: {
134 enumerable: false,
135 value: false
136 },
137
138 /**
139 Description TODO
140 @private
141 */
142 _needsAssignOriginalContent: {
143 enumerable: false,
144 value: true
145 },
146
147 /**
148 Description TODO
149 @private
150 */
151 _needsAssingValue: {
152 enumerable: false,
153 value: false
154 },
155
156 /**
157 Description TODO
158 @private
159 */
160 _setCaretAtEndOfContent: {
161 enumerable: false,
162 value: false
163 },
164
165 /**
166 Description TODO
167 @private
168 */
169 _selectionChangeTimer: {
170 enumerable: false,
171 value: null
172 },
173
174 /**
175 Description TODO
176 @private
177 */
178 _hasFocus: {
179 enumerable: false,
180 value: false
181 },
182
183 /**
184 Description TODO
185 @private
186 */
187 _needsFocus: {
188 value: false
189 },
190
191 /**
192 Description TODO
193 @private
194 */
195 _isActiveElement: {
196 enumerable: false,
197 value: false
198 },
199
200 /**
201 Description TODO
202 @private