aboutsummaryrefslogtreecommitdiff
path: root/node_modules/labs/rich-text-editor.reel
diff options
context:
space:
mode:
authorArmen Kesablyan2012-02-07 16:43:22 -0800
committerArmen Kesablyan2012-02-07 16:43:22 -0800
commit7f8730c3add146f1ba107e6fc22d1f5a8348ed8b (patch)
treec92d9cc664055640b3dac8b4edf9ae727dc5287d /node_modules/labs/rich-text-editor.reel
parentd7ead10b566e7de121b2cd2c99fecca8469d63b8 (diff)
downloadninja-7f8730c3add146f1ba107e6fc22d1f5a8348ed8b.tar.gz
Refactored rich text editor location
Diffstat (limited to 'node_modules/labs/rich-text-editor.reel')
-rw-r--r--node_modules/labs/rich-text-editor.reel/rich-text-editor.css112
-rw-r--r--node_modules/labs/rich-text-editor.reel/rich-text-editor.html27
-rw-r--r--node_modules/labs/rich-text-editor.reel/rich-text-editor.js1668
-rw-r--r--node_modules/labs/rich-text-editor.reel/rich-text-resizer.js349
-rw-r--r--node_modules/labs/rich-text-editor.reel/rich-text-sanitizer.js132
-rw-r--r--node_modules/labs/rich-text-editor.reel/shortcut-manager.js237
6 files changed, 2525 insertions, 0 deletions
diff --git a/node_modules/labs/rich-text-editor.reel/rich-text-editor.css b/node_modules/labs/rich-text-editor.reel/rich-text-editor.css
new file mode 100644
index 00000000..656183c4
--- /dev/null
+++ b/node_modules/labs/rich-text-editor.reel/rich-text-editor.css
@@ -0,0 +1,112 @@
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.montage-editor {
8 /* need to be relative in order for the resizer to be positioned correctly */
9 position: absolute;
10 top: 0;
11 left: 0;
12 bottom: 0;
13 right: 0;
14 padding: 4px;
15
16 font-size: 1.0em;
17 outline: none;
18 overflow: auto;
19 z-index: 1;
20}
21
22.montage-editor-frame {
23 position: relative;
24 overflow: auto;
25 height: 100%;
26 width: 100%;
27}
28
29.montage-resizer-element::selection {
30 background: rgba(0,0,0,0);
31}
32
33
34/*
35Resizer
36*/
37.montage-resizer {
38 display: inline-block;
39}
40
41.montage-resizer-frame {
42 position: absolute;
43 border: 1px solid black;
44 z-index: 30;
45}
46
47.montage-resizer-handle {
48 position: absolute;
49 border: 1px solid black;
50 background-color: white;
51 width: 6px;
52 height: 6px;
53 z-index: 31;
54}
55
56.montage-resizer.dragged .montage-resizer-handle{
57 display: none;
58}
59
60.montage-resizer-handle:hover {
61 background-color: black;
62}
63
64.montage-resizer-n {
65 cursor: n-resize;
66}
67.montage-resizer-ne {
68 cursor: ne-resize;
69}
70.montage-resizer-e {
71 cursor: e-resize;
72}
73.montage-resizer-se {
74 cursor: se-resize;
75}
76.montage-resizer-s {
77 cursor: s-resize;
78}
79.montage-resizer-sw {
80 cursor: sw-resize;
81}
82.montage-resizer-w {
83 cursor: w-resize;
84}
85.montage-resizer-nw {
86 cursor: nw-resize;
87}
88
89
90/*
91Link Popup
92*/
93.montage-link-popup {
94 -webkit-box-shadow: 0 1px 3px rgba(0,0,0,.2);
95 -webkit-border-radius: 2px;
96 border-radius: 2px;
97 position: absolute;
98 border: 1px solid;
99 background-color: white;
100 color: #666;
101 padding: 12px 20px;
102 z-index: 50;
103 cursor: default;
104 border-color: #BBB #BBB #A8A8A8;
105 font: 13px/normal "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
106}
107
108.montage-link-popup a {
109 cursor: pointer;
110 text-decoration: none;
111 color: #15C;
112} \ No newline at end of file
diff --git a/node_modules/labs/rich-text-editor.reel/rich-text-editor.html b/node_modules/labs/rich-text-editor.reel/rich-text-editor.html
new file mode 100644
index 00000000..42425b40
--- /dev/null
+++ b/node_modules/labs/rich-text-editor.reel/rich-text-editor.html
@@ -0,0 +1,27 @@
1<!DOCTYPE html>
2<!-- <copyright>
3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6 </copyright> -->
7<html>
8<head>
9 <title></title>
10 <link rel="stylesheet" type="text/css" href="rich-text-editor.css">
11 <script type="text/montage-serialization">
12 {
13 "owner": {
14 "module": "node_modules/labs/rich-text-editor.reel",
15 "name": "RichTextEditor",
16 "properties": {
17
18 }
19 }
20 }
21 </script>
22
23</head>
24<body>
25</body>
26</html>
27 \ No newline at end of file
diff --git a/node_modules/labs/rich-text-editor.reel/rich-text-editor.js b/node_modules/labs/rich-text-editor.reel/rich-text-editor.js
new file mode 100644
index 00000000..3fece294
--- /dev/null
+++ b/node_modules/labs/rich-text-editor.reel/rich-text-editor.js
@@ -0,0 +1,1668 @@
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/core/core").Montage,
11 Component = require("montage/ui/component").Component,
12 MutableEvent = require("montage/core/event/mutable-event").MutableEvent,
13 Resizer = require("node_modules/labs/rich-text-editor.reel/rich-text-resizer").Resizer,
14 Sanitizer = require("node_modules/labs/rich-text-editor.reel/rich-text-sanitizer").Sanitizer;
15
16/**
17 @class module:"montage/ui/rich-text-editor.reel".RichTextEditor
18 @extends module:montage/ui/component.Component
19*/
20exports.RichTextEditor = Montage.create(Component,/** @lends module:"montage/ui/rich-text-editor.reel".RichTextEditor# */ {
21
22 /**
23 Description TODO
24 @private
25 */
26 _hasSelectionChangeEvent: {
27 enumerable: false,
28 value: null // Need to be preset to null, will be set to true or false later on
29 },
30
31 /**
32 Description TODO
33 @private
34 */
35 _uniqueId: {
36 enumerable: false,
37 value: Math.floor(Math.random() * 1000) + "-" + Math.floor(Math.random() * 1000)
38 },
39
40 /**
41 Description TODO
42 @private
43 */
44 _needsSelectionReset: {
45 enumerable: false,
46 value: false
47 },
48
49 /**
50 Description TODO
51 @private
52 */
53 _selectionChangeTimer: {
54 enumerable: false,
55 value: null
56 },
57
58 /**
59 Description TODO
60 @private
61 */
62 _activeLink: {
63 enumerable: false,
64 value: null
65 },
66