├── fonts
├── icomoon.eot
├── icomoon.ttf
├── icomoon.woff
├── icomoon.svg
└── icomoon.dev.svg
├── license.txt
├── readme.md
├── css
├── fonts.css
├── site.css
├── note-editor.css
├── style.css
└── transmat.css
├── index.html
└── javascript
├── jquery-htmlclean.js
└── note-editor.js
/fonts/icomoon.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/glennjones/note-editor/HEAD/fonts/icomoon.eot
--------------------------------------------------------------------------------
/fonts/icomoon.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/glennjones/note-editor/HEAD/fonts/icomoon.ttf
--------------------------------------------------------------------------------
/fonts/icomoon.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/glennjones/note-editor/HEAD/fonts/icomoon.woff
--------------------------------------------------------------------------------
/license.txt:
--------------------------------------------------------------------------------
1 | MIT License - note-editor
2 |
3 | Copyright (c) 2015 Glenn Jones
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | # Note-Editor
2 |
3 | # IN DEVELOPMENT - NOT STABLE YET
4 | A note editor compenent for indie blogging platforms. It can be used where you need a simple to use minimalist writing experience. A good example been status updates or small notes. Its based on a modified version of Zenpen by Tim Holman.
5 |
6 | ### Features
7 | * Styling bold, italic and links - popup style palette
8 | * Copy and paste HTML - with built-in HTML cleaning
9 | * Character count - with limit warning
10 | * Auto link any URLs
11 | * Auto links Twitter @username or #tag
12 | * JS method to inject @username at the begining of the text
13 | * Hijacks a existing input/textarea for progressive enchancement
14 | * Ouputs in Text, HTML, Microformats JSON and Tag list
15 |
16 |
17 |
18 |
19 | ### Support or Contact
20 | Having trouble, please raise an issue at: [https://github.com/glennjones/note-editor/issues](https://github.com/glennjones/note-editor/issues)
21 |
22 |
23 | ### License
24 | The project is open sourced under MIT license. See the [license.txt](https://raw.github.com/glennjones/note-editor/master/license.txt "license.txt") file within the project source.
--------------------------------------------------------------------------------
/css/fonts.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'icomoon';
3 | src:url('fonts/icomoon.eot');
4 | src:url('fonts/icomoon.eot?#iefix') format('embedded-opentype'),
5 | url('fonts/icomoon.woff') format('woff'),
6 | url('fonts/icomoon.ttf') format('truetype'),
7 | url('fonts/icomoon.svg#icomoon') format('svg');
8 | font-weight: normal;
9 | font-style: normal;
10 | }
11 |
12 | /* Use the following CSS code if you want to use data attributes for inserting your icons */
13 | [data-icon]:before {
14 | font-family: 'icomoon';
15 | content: attr(data-icon);
16 | speak: none;
17 | font-weight: normal;
18 | font-variant: normal;
19 | text-transform: none;
20 | line-height: 1;
21 | -webkit-font-smoothing: antialiased;
22 | }
23 |
24 | /* Use the following CSS code if you want to have a class per icon */
25 | /*
26 | Instead of a list of all class selectors,
27 | you can use the generic selector below, but it's slower:
28 | [class*="icon-"] {
29 | */
30 | .icon-expand, .icon-target, .icon-contrast, .icon-floppy, .icon-contract, .icon-link, .icon-download-alt {
31 | font-family: 'icomoon';
32 | speak: none;
33 | font-style: normal;
34 | font-weight: normal;
35 | font-variant: normal;
36 | text-transform: none;
37 | line-height: 1;
38 | -webkit-font-smoothing: antialiased;
39 | }
40 | .icon-expand:before {
41 | content: "\e000";
42 | }
43 | .icon-target:before {
44 | content: "\e001";
45 | }
46 | .icon-contrast:before {
47 | content: "\e002";
48 | }
49 | .icon-floppy:before {
50 | content: "\e003";
51 | }
52 | .icon-contract:before {
53 | content: "\e004";
54 | }
55 | .icon-link:before {
56 | content: "\e005";
57 | }
58 | .icon-download-alt:before {
59 | content: "\e006";
60 | }
--------------------------------------------------------------------------------
/css/site.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 2em;
3 | font-family: Lato, "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
4 | font-size: 1.20000em;
5 | font-weight: 400;
6 | color: #333333;
7 | }
8 |
9 | .container{
10 | max-width: 35em;
11 | margin: 0 auto;
12 | }
13 |
14 | code{
15 | padding: .2rem .33rem;
16 | color: #6f6f6f;
17 | background-color: #f3f3f3;
18 | }
19 |
20 | a {
21 | color: #33a0e8;
22 | text-decoration: none;
23 | }
24 |
25 | a:hover, a:active {
26 | color: #fc0599;
27 | text-decoration: none;
28 | }
29 |
30 | p{
31 | margin-top: 0;
32 | line-height: 1.62500em;
33 | }
34 |
35 | ul, ol{
36 | line-height: 1.62500em;
37 | }
38 |
39 | h1{
40 | font-size: 2em;
41 | }
42 |
43 | h2{
44 | margin-top: 3em;
45 | margin-bottom: 0;
46 | }
47 |
48 |
49 | h3{
50 | margin-top: 3em;
51 | margin-bottom: 0;
52 | }
53 |
54 | input, textarea{
55 | font-size: 1em;
56 | }
57 |
58 |
59 | .large-text-area {
60 | font-family: Lato, "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
61 | font-size: 1em;
62 | font-weight: normal;
63 | font-style: normal;
64 | letter-spacing: normal;
65 | line-height: normal;
66 | text-transform: none;
67 | word-spacing: normal;
68 | text-indent: inherit;
69 | word-wrap: break-word;
70 | white-space: pre-wrap;
71 | background-color: rgba(0, 0, 0, 0);
72 | color: #000;
73 | position: relative;
74 | overflow-y: visible;
75 | min-height: 6em;
76 | padding: 1em;
77 | padding-bottom: 2em;
78 | margin: 0em;
79 | left: 0em;
80 | top: 0em;
81 | }
82 |
83 |
84 | input[type="submit"] {
85 | display: inline-block;
86 | padding-top: 0.4em;
87 | padding-right: 1em;
88 | padding-left: 1em;
89 | padding-bottom: 0.5em;
90 | margin-bottom: 0;
91 | font-weight: 200;
92 | font-size: 1rem;
93 | text-align: center;
94 | white-space: nowrap;
95 | cursor: pointer;
96 | background-image: none;
97 | border: 1px solid transparent;
98 | border-radius: 3px;
99 | background-color: #33a0e8;
100 | color: #fff;
101 | user-select: none;
102 | }
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Note Editor
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
Note editor ‐ Example of output
53 |
A note editor for indie blogging platforms.
54 |
55 |
56 |
71 |
72 |
73 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/fonts/icomoon.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/fonts/icomoon.dev.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/css/note-editor.css:
--------------------------------------------------------------------------------
1 | .ui button, .text-options button {
2 |
3 | -webkit-transition: opacity 400ms;
4 | -moz-transition: opacity 400ms;
5 | -ms-transition: opacity 400ms;
6 | -o-transition: opacity 400ms;
7 | transition: opacity 400ms;
8 |
9 | font-family: inherit;
10 | background: none;
11 | cursor: pointer;
12 | font-size: 25px;
13 | color: inherit;
14 | opacity: 0.1;
15 | padding: 0px;
16 | height: 32px;
17 | width: 25px;
18 | border: 0px;
19 | }
20 |
21 | .useicons {
22 | -webkit-font-smoothing: antialiased;
23 | font-size: 20px !important;
24 | font-family: 'icomoon' !important;
25 | }
26 |
27 | .options button:hover {
28 | opacity: 0.95;
29 | }
30 |
31 | .note-editor{
32 | position: relative;
33 | border: none;
34 | padding: 0;
35 | margin: 0;
36 | }
37 |
38 | .note-editor-count {
39 | color: #ccc;
40 | border-radius: 12px;
41 | padding-left: 16px;
42 | padding-right: 16px;
43 | display: block;
44 | text-align: middle;
45 | position: absolute;
46 | font-size: 0.85em;
47 | vertical-align: middle;
48 | text-align: center;
49 | right: 6px;
50 | bottom: 16px;
51 | }
52 |
53 | .note-editor-over{
54 | color: red;
55 | }
56 |
57 |
58 | .note-editor-ui {
59 | border: 1px #ccc solid;
60 | position: relative;
61 | overflow-y: visible;
62 | width: 100%;
63 | min-height: 6em;
64 | padding: 1em;
65 | padding-bottom: 2em;
66 | margin: 0em;
67 | margin-bottom: 0.2em;
68 | left: 0em;
69 | top: 0em;
70 | -moz-box-sizing: border-box;
71 | -webkit-box-sizing: border-box;
72 | box-sizing: border-box;
73 | -webkit-appearance: none;
74 | outline: none;
75 | }
76 |
77 |
78 |
79 |
80 | @font-face {
81 | font-family: 'icomoon';
82 | src:url('../fonts/icomoon.eot');
83 | src:url('../fonts/icomoon.eot?#iefix') format('embedded-opentype'),
84 | url('../fonts/icomoon.woff') format('woff'),
85 | url('../fonts/icomoon.ttf') format('truetype'),
86 | url('../fonts/icomoon.svg#icomoon') format('svg');
87 | font-weight: normal;
88 | font-style: normal;
89 | }
90 |
91 | /* Use the following CSS code if you want to use data attributes for inserting your icons */
92 | [data-icon]:before {
93 | font-family: 'icomoon';
94 | content: attr(data-icon);
95 | speak: none;
96 | font-weight: normal;
97 | font-variant: normal;
98 | text-transform: none;
99 | line-height: 1;
100 | -webkit-font-smoothing: antialiased;
101 | }
102 |
103 | /* Use the following CSS code if you want to have a class per icon */
104 | /*
105 | Instead of a list of all class selectors,
106 | you can use the generic selector below, but it's slower:
107 | [class*="icon-"] {
108 | */
109 | .icon-expand, .icon-target, .icon-contrast, .icon-floppy, .icon-contract, .icon-link, .icon-download-alt {
110 | font-family: 'icomoon';
111 | speak: none;
112 | font-style: normal;
113 | font-weight: normal;
114 | font-variant: normal;
115 | text-transform: none;
116 | line-height: 1;
117 | -webkit-font-smoothing: antialiased;
118 | }
119 | .icon-expand:before {
120 | content: "\e000";
121 | }
122 | .icon-target:before {
123 | content: "\e001";
124 | }
125 | .icon-contrast:before {
126 | content: "\e002";
127 | }
128 | .icon-floppy:before {
129 | content: "\e003";
130 | }
131 | .icon-contract:before {
132 | content: "\e004";
133 | }
134 | .icon-link:before {
135 | content: "\e005";
136 | }
137 | .icon-download-alt:before {
138 | content: "\e006";
139 | }
140 |
141 |
142 | .no-overflow {
143 | overflow: hidden;
144 | display: block;
145 | height: 100%;
146 | width: 100%;
147 | }
148 |
149 |
150 |
151 | .text-options {
152 |
153 | -webkit-transition: opacity 250ms, margin 250ms;
154 | -moz-transition: opacity 250ms, margin 250ms;
155 | -ms-transition: opacity 250ms, margin 250ms;
156 | -o-transition: opacity 250ms, margin 250ms;
157 | transition: opacity 250ms, margin 250ms;
158 |
159 | position: absolute;
160 | left: -999px;
161 | top: -999px;
162 | color: #fff;
163 | height: 0px;
164 | width: 0px;
165 | z-index: 5;
166 | margin-top: 5px;
167 | opacity: 0;
168 | }
169 |
170 | .text-options.fade {
171 | opacity: 0;
172 | margin-top: -5px;
173 | }
174 |
175 | .text-options.active {
176 | opacity: 1;
177 | margin-top: 0px;
178 | }
179 |
180 | .options {
181 | background-color: rgba(0,0,0,0.9);
182 | position: absolute;
183 | border-radius: 5px;
184 | margin-left: -63px;
185 | margin-top: -46px;
186 | z-index: 1000;
187 | padding-top: 5px;
188 | padding-bottom: 0px;
189 | padding-left: 5px;
190 | padding-right: 5px;
191 | width: 125px;
192 | height: 40px;
193 |
194 | -webkit-transition: all 300ms ease-in-out;
195 | -moz-transition: all 300ms ease-in-out;
196 | -ms-transition: all 300ms ease-in-out;
197 | -o-transition: all 300ms ease-in-out;
198 | transition: all 300ms ease-in-out;
199 | }
200 |
201 | .options.url-mode {
202 |
203 | width: 280px;
204 | margin-left: -137px;
205 | }
206 |
207 | .options.url-mode .bold, .options.url-mode .italic, .options.url-mode .quote {
208 | width: 0px;
209 | overflow: hidden;
210 | margin-right: 0px;
211 | opacity: 0;
212 | }
213 |
214 | .options .italic {
215 | font-style: italic;
216 | }
217 |
218 | .options button {
219 | -webkit-transition: all 250ms ease-in-out;
220 | -moz-transition: all 250ms ease-in-out;
221 | -ms-transition: all 250ms ease-in-out;
222 | -o-transition: all 250ms ease-in-out;
223 | transition: all 250ms ease-in-out;
224 |
225 | float: left;
226 | width: 28px;
227 | opacity: 0.7;
228 | height: 30px;
229 | border-radius: 3px;
230 | margin-right: 1px;
231 | font-family: 'Lora', serif;
232 | }
233 |
234 | .options.url-mode input{
235 | border-left: 2px solid transparent;
236 | padding-right: 5px;
237 | padding-left: 5px;
238 | width: 236px;
239 | }
240 |
241 | .options input {
242 | -webkit-transition: all 300ms ease-in-out;
243 | -moz-transition: all 300ms ease-in-out;
244 | -ms-transition: all 300ms ease-in-out;
245 | -o-transition: all 300ms ease-in-out;
246 | transition: all 300ms ease-in-out;
247 |
248 | border-radius: 3px;
249 | overflow: hidden;
250 | outline: 0px;
251 | height: 30px;
252 | padding: 0px;
253 | margin: 0px;
254 | border: 0px;
255 | float: left;
256 | width: 0px;
257 | }
258 |
259 | .options button.active {
260 | background-color: rgba(255,255,255,0.4);
261 | opacity: 1;
262 | }
263 |
264 | .yang .options button.active {
265 | background-color: rgba(0,0,0,0.3);
266 | }
267 |
268 | .options button:hover {
269 | opacity: 0.95;
270 | }
271 |
272 | .options:before {
273 | content: "";
274 | border-top: 5px solid rgba(0,0,0,0.9);
275 | border-bottom: 5px solid transparent;
276 | border-right: 5px solid transparent;
277 | border-left: 5px solid transparent;
278 | position: absolute;
279 | margin-left: -5px;
280 | bottom: -15px;
281 | height: 5px;
282 | width: 0px;
283 | left: 50%;
284 | }
285 |
286 | .yang .options {
287 | background-color: rgba(255,255,255,0.9);
288 | color: #000;
289 | }
290 |
291 | .yang .options:before {
292 | border-top: 5px solid rgba(255,255,255,0.9);
293 | }
294 |
295 | .url {
296 | -webkit-font-smoothing: antialiased;
297 | }
298 |
299 | .top {
300 | position: absolute;
301 | top: 0px;
302 | }
303 |
304 | .bottom {
305 | position: absolute;
306 | bottom: 0px;
307 | }
308 |
309 | .about {
310 | font-family: 'Lora', serif;
311 | font-size: 28px !important
312 | }
313 |
314 | .wrapper {
315 | position: relative;
316 | height: 100%;
317 | }
--------------------------------------------------------------------------------
/css/style.css:
--------------------------------------------------------------------------------
1 | /*!
2 | * ZenPen
3 | * http://www.zenpen.io
4 | * MIT licensed
5 | *
6 | * Copyright (C) Tim Holman, http://tholman.com
7 | */
8 |
9 |
10 | /*********************************************
11 | * BASE STYLES
12 | *********************************************/
13 |
14 |
15 |
16 |
17 |
18 |
19 | article {
20 | padding-bottom: 50px;
21 | margin-top: 22px;
22 | display: block;
23 | -webkit-appearance: none;
24 | outline: none;
25 | }
26 |
27 | blockquote {
28 | border-left: 4px solid deepskyblue;
29 | margin-left: -19px;
30 | padding-left: 15px;
31 | margin-right: 0px;
32 | }
33 |
34 | .no-overflow {
35 | overflow: hidden;
36 | display: block;
37 | height: 100%;
38 | width: 100%;
39 | }
40 |
41 | /* Used by the ui bubble to stop wrapping */
42 | .lengthen {
43 | display: block;
44 | width: 300px;
45 | height: 100%;
46 | }
47 |
48 | .useicons {
49 | -webkit-font-smoothing: antialiased;
50 | font-size: 20px !important;
51 | font-family: 'icomoon' !important;
52 | }
53 |
54 | .ui {
55 | position: fixed;
56 | padding: 20px;
57 | width: 65px;
58 | bottom: 0px;
59 | left: 0px;
60 | top: 0px;
61 | }
62 |
63 | .ui:hover button {
64 | opacity: 0.4;
65 | }
66 |
67 | .ui button:hover {
68 | opacity: 1;
69 | }
70 |
71 | .ui button, .text-options button {
72 |
73 | -webkit-transition: opacity 400ms;
74 | -moz-transition: opacity 400ms;
75 | -ms-transition: opacity 400ms;
76 | -o-transition: opacity 400ms;
77 | transition: opacity 400ms;
78 |
79 | font-family: inherit;
80 | background: none;
81 | cursor: pointer;
82 | font-size: 25px;
83 | color: inherit;
84 | opacity: 0.1;
85 | padding: 0px;
86 | height: 32px;
87 | width: 25px;
88 | border: 0px;
89 | }
90 |
91 | .overlay {
92 | position: fixed;
93 | display: none;
94 | height: 100%;
95 | width: 100%;
96 | z-index: 3;
97 | left: 0px;
98 | top: 0px;
99 | }
100 |
101 | .quote {
102 | line-height: 60px !important;
103 | font-size: 49px !important;
104 | }
105 |
106 | /*********************************************
107 | * MODAL
108 | *********************************************/
109 |
110 | .yang .modal {
111 | background-color: rgba(255,255,255,0.9);
112 | color: #111;
113 | }
114 |
115 | .modal {
116 | background-color: rgba(0,0,0,0.9);
117 | margin-left: -200px;
118 | position: absolute;
119 | border-radius: 3px;
120 | height: 101px;
121 | padding: 15px;
122 | display: none;
123 | width: 400px;
124 | bottom: 10px;
125 | color: #fff;
126 | left: 50%;
127 | }
128 |
129 | .modal h1 {
130 | text-align: center;
131 | font-size: 20px;
132 | padding: 0px;
133 | margin: 0px;
134 | }
135 |
136 | .modal div {
137 | margin-bottom: 10px;
138 | margin-top: 10px;
139 | }
140 |
141 | .modal input[type="number"] {
142 | font-size: 16px;
143 | display: block;
144 | margin: auto;
145 | width: 150px;
146 | padding: 5px;
147 | }
148 |
149 | .description {
150 | height: 225px;
151 | }
152 |
153 | .saveoverlay {
154 | margin-left: -215px;
155 | margin-top: -100px;
156 | height: 170px;
157 | left: 50%;
158 | top: 50%;
159 | }
160 |
161 | .saveoverlay div {
162 | text-align: center;
163 | font-size: 11px;
164 | }
165 |
166 | .saveselection {
167 | margin-top: 17px;
168 | text-align:center;
169 | }
170 |
171 | .saveselection span {
172 |
173 | -webkit-transition: color 250ms, background 250ms;
174 | -moz-transition: color 250ms, background 250ms;
175 | -ms-transition: color 250ms, background 250ms;
176 | -o-transition: color 250ms, background 250ms;
177 | transition: color 250ms, background 250ms;
178 |
179 | cursor: pointer;
180 | font-size: 15px;
181 | margin: 5px;
182 | padding: 5px;
183 | border: 2px solid white;
184 | border-radius: 3px;
185 | }
186 |
187 | .saveselection span:hover {
188 | background: rgba(255,255,255,0.8);
189 | color: black;
190 | }
191 |
192 | .savebutton {
193 |
194 | -webkit-transition: opacity 250ms;
195 | -moz-transition: opacity 250ms;
196 | -ms-transition: opacity 250ms;
197 | -o-transition: opacity 250ms;
198 | transition: opacity 250ms;
199 |
200 | font-size: 30px !important;
201 | margin: 15px auto;
202 | background: none;
203 | cursor: pointer;
204 | display: block;
205 | border: none;
206 | padding: 0px;
207 | width: 80px;
208 | color: #fff;
209 | margin-top: -2px;
210 | }
211 |
212 | .savebutton:hover {
213 | opacity: 0.7;
214 | }
215 |
216 | .activesave {
217 | background: rgba(255,255,255,0.8);
218 | color: black;
219 | }
220 |
221 | .hiddentextbox {
222 | opacity:0;
223 | filter:alpha(opacity=0);
224 | position:absolute;
225 | }
226 |
227 | /*********************************************
228 | * WORK COUNT
229 | *********************************************/
230 |
231 | .wordcount {
232 | margin-left: -150px;
233 | width: 300px;
234 | }
235 |
236 | .word-counter {
237 | box-shadow: inset 0px 0px 9px -2px rgba(0,0,0,0.9);
238 | position: fixed;
239 | height: 100%;
240 | right: -6px;
241 | width: 6px;
242 | top: 0px;
243 | }
244 |
245 | .word-counter.active {
246 | right: 0px;
247 | }
248 |
249 | .word-counter .progress {
250 | -webkit-transition: all 400ms ease-in-out;
251 | -moz-transition: all 400ms ease-in-out;
252 | -ms-transition: all 400ms ease-in-out;
253 | -o-transition: all 400ms ease-in-out;
254 | transition: all 400ms ease-in-out;
255 |
256 | background-color: deepskyblue;
257 | position: absolute;
258 | bottom: 0px;
259 | width: 100%;
260 | height: 0%;
261 | }
262 |
263 | .progress.complete{
264 | background-color: greenyellow;
265 | }
266 |
267 | /*********************************************
268 | * UI BUBBLE
269 | *********************************************/
270 |
271 | .text-options {
272 |
273 | -webkit-transition: opacity 250ms, margin 250ms;
274 | -moz-transition: opacity 250ms, margin 250ms;
275 | -ms-transition: opacity 250ms, margin 250ms;
276 | -o-transition: opacity 250ms, margin 250ms;
277 | transition: opacity 250ms, margin 250ms;
278 |
279 | position: absolute;
280 | left: -999px;
281 | top: -999px;
282 | color: #fff;
283 | height: 0px;
284 | width: 0px;
285 | z-index: 5;
286 | margin-top: 5px;
287 | opacity: 0;
288 | }
289 |
290 | .text-options.fade {
291 | opacity: 0;
292 | margin-top: -5px;
293 | }
294 |
295 | .text-options.active {
296 | opacity: 1;
297 | margin-top: 0px;
298 | }
299 |
300 | .options {
301 | background-color: rgba(0,0,0,0.9);
302 | position: absolute;
303 | border-radius: 5px;
304 | margin-left: -63px;
305 | margin-top: -46px;
306 | z-index: 1000;
307 | padding: 5px 4px 5px 5px;
308 | width: 125px;
309 | height: 40px;
310 |
311 | -webkit-transition: all 300ms ease-in-out;
312 | -moz-transition: all 300ms ease-in-out;
313 | -ms-transition: all 300ms ease-in-out;
314 | -o-transition: all 300ms ease-in-out;
315 | transition: all 300ms ease-in-out;
316 | }
317 |
318 | .options.url-mode {
319 | width: 275px;
320 | margin-left: -137px;
321 | }
322 |
323 | .options.url-mode .bold, .options.url-mode .italic, .options.url-mode .quote {
324 | width: 0px;
325 | overflow: hidden;
326 | margin-right: 0px;
327 | opacity: 0;
328 | }
329 |
330 | .options .italic {
331 | font-style: italic;
332 | }
333 |
334 | .options button {
335 | -webkit-transition: all 250ms ease-in-out;
336 | -moz-transition: all 250ms ease-in-out;
337 | -ms-transition: all 250ms ease-in-out;
338 | -o-transition: all 250ms ease-in-out;
339 | transition: all 250ms ease-in-out;
340 |
341 | float: left;
342 | width: 28px;
343 | opacity: 0.7;
344 | height: 30px;
345 | border-radius: 3px;
346 | margin-right: 1px;
347 | font-family: 'Lora', serif;
348 | }
349 |
350 | .options.url-mode input{
351 | border-left: 2px solid transparent;
352 | padding-right: 5px;
353 | padding-left: 5px;
354 | width: 236px;
355 | }
356 |
357 | .options input {
358 | -webkit-transition: all 300ms ease-in-out;
359 | -moz-transition: all 300ms ease-in-out;
360 | -ms-transition: all 300ms ease-in-out;
361 | -o-transition: all 300ms ease-in-out;
362 | transition: all 300ms ease-in-out;
363 |
364 | border-radius: 3px;
365 | overflow: hidden;
366 | outline: 0px;
367 | height: 30px;
368 | padding: 0px;
369 | margin: 0px;
370 | border: 0px;
371 | float: left;
372 | width: 0px;
373 | }
374 |
375 | .options button.active {
376 | background-color: rgba(255,255,255,0.4);
377 | opacity: 1;
378 | }
379 |
380 | .yang .options button.active {
381 | background-color: rgba(0,0,0,0.3);
382 | }
383 |
384 | .options button:hover {
385 | opacity: 0.95;
386 | }
387 |
388 | .options:before {
389 | content: "";
390 | border-top: 5px solid rgba(0,0,0,0.9);
391 | border-bottom: 5px solid transparent;
392 | border-right: 5px solid transparent;
393 | border-left: 5px solid transparent;
394 | position: absolute;
395 | margin-left: -5px;
396 | bottom: -15px;
397 | height: 5px;
398 | width: 0px;
399 | left: 50%;
400 | }
401 |
402 | .yang .options {
403 | background-color: rgba(255,255,255,0.9);
404 | color: #000;
405 | }
406 |
407 | .yang .options:before {
408 | border-top: 5px solid rgba(255,255,255,0.9);
409 | }
410 |
411 | .url {
412 | -webkit-font-smoothing: antialiased;
413 | }
414 |
415 | .top {
416 | position: absolute;
417 | top: 0px;
418 | }
419 |
420 | .bottom {
421 | position: absolute;
422 | bottom: 0px;
423 | }
424 |
425 | .about {
426 | font-family: 'Lora', serif;
427 | font-size: 28px !important
428 | }
429 |
430 | .wrapper {
431 | position: relative;
432 | height: 100%;
433 | }
434 |
435 | /*********************************************
436 | * PRINT
437 | *********************************************/
438 |
439 | @media print {
440 |
441 | body {
442 | overflow: visible;
443 | }
444 |
445 | section {
446 | color: #111 !important;
447 | }
448 |
449 | .text-options, .ui, .word-counter {
450 | display: none;
451 | }
452 | }
--------------------------------------------------------------------------------
/javascript/jquery-htmlclean.js:
--------------------------------------------------------------------------------
1 | /*
2 | HTML Clean for jQuery
3 | Anthony Johnston
4 | http://www.antix.co.uk
5 |
6 | version 1.4.0
7 |
8 | $Revision: 99 $
9 |
10 | requires jQuery http://jquery.com
11 |
12 | Use and distibution http://www.opensource.org/licenses/bsd-license.php
13 |
14 | 2010-04-02 allowedTags/removeTags added (white/black list) thanks to David Wartian (Dwartian)
15 | 2010-06-30 replaceStyles added for replacement of bold, italic, super and sub styles on a tag
16 | 2012-04-30 allowedAttributes added, an array of attributed allowed on the elements
17 | 2013-02-25 now will push non-inline elements up the stack if nested in an inline element
18 | 2013-02-25 comment element support added, removed by default, see AllowComments in options
19 | */
20 | (function ($) {
21 | $.fn.htmlClean = function (options) {
22 | // iterate and html clean each matched element
23 | return this.each(function () {
24 | if (this.value) {
25 | this.value = $.htmlClean(this.value, options);
26 | } else {
27 | this.innerHTML = $.htmlClean(this.innerHTML, options);
28 | }
29 | });
30 | };
31 |
32 | // clean the passed html
33 | $.htmlClean = function (html, options) {
34 | options = $.extend({}, $.htmlClean.defaults, options);
35 | options.allowEmpty = tagAllowEmpty.concat(options.allowEmpty);
36 |
37 | var tagsRE = /(<(\/)?(\w+:)?([\w]+)([^>]*)>)|