aboutsummaryrefslogtreecommitdiff
path: root/release/samples
diff options
context:
space:
mode:
Diffstat (limited to 'release/samples')
-rw-r--r--release/samples/css/samples.css1632
-rw-r--r--release/samples/img/github-top.pngbin0 -> 383 bytes
-rw-r--r--release/samples/img/header-bg.pngbin0 -> 13086 bytes
-rw-r--r--release/samples/img/header-separator.pngbin0 -> 123 bytes
-rw-r--r--release/samples/img/logo.pngbin0 -> 5891 bytes
-rw-r--r--release/samples/img/navigation-tip.pngbin0 -> 12029 bytes
-rw-r--r--release/samples/index.html128
-rw-r--r--release/samples/js/sample.js53
-rw-r--r--release/samples/js/sf.js17
-rw-r--r--release/samples/old/ajax.html85
-rw-r--r--release/samples/old/api.html210
-rw-r--r--release/samples/old/appendto.html59
-rw-r--r--release/samples/old/assets/inlineall/logo.pngbin0 -> 4283 bytes
-rw-r--r--release/samples/old/assets/outputxhtml/outputxhtml.css204
-rw-r--r--release/samples/old/assets/posteddata.php59
-rw-r--r--release/samples/old/assets/sample.jpgbin0 -> 14449 bytes
-rw-r--r--release/samples/old/assets/uilanguages/languages.js7
-rw-r--r--release/samples/old/datafiltering.html508
-rw-r--r--release/samples/old/dialog/assets/my_dialog.js48
-rw-r--r--release/samples/old/dialog/dialog.html190
-rw-r--r--release/samples/old/divreplace.html144
-rw-r--r--release/samples/old/enterkey/enterkey.html106
-rw-r--r--release/samples/old/htmlwriter/assets/outputforflash/outputforflash.flabin0 -> 85504 bytes
-rw-r--r--release/samples/old/htmlwriter/assets/outputforflash/outputforflash.swfbin0 -> 15571 bytes
-rw-r--r--release/samples/old/htmlwriter/assets/outputforflash/swfobject.js19
-rw-r--r--release/samples/old/htmlwriter/outputforflash.html283
-rw-r--r--release/samples/old/htmlwriter/outputhtml.html224
-rw-r--r--release/samples/old/index.html131
-rw-r--r--release/samples/old/inlineall.html314
-rw-r--r--release/samples/old/inlinebycode.html124
-rw-r--r--release/samples/old/inlinetextarea.html113
-rw-r--r--release/samples/old/jquery.html103
-rw-r--r--release/samples/old/magicline/magicline.html209
-rw-r--r--release/samples/old/readonly.html76
-rw-r--r--release/samples/old/replacebyclass.html60
-rw-r--r--release/samples/old/replacebycode.html59
-rw-r--r--release/samples/old/sample.css357
-rw-r--r--release/samples/old/sample.js50
-rw-r--r--release/samples/old/sample_posteddata.php16
-rw-r--r--release/samples/old/tabindex.html78
-rw-r--r--release/samples/old/toolbar/toolbar.html235
-rw-r--r--release/samples/old/uicolor.html72
-rw-r--r--release/samples/old/uilanguages.html122
-rw-r--r--release/samples/old/wysiwygarea/fullpage.html80
-rw-r--r--release/samples/old/xhtmlstyle.html234
-rw-r--r--release/samples/toolbarconfigurator/css/fontello.css55
-rw-r--r--release/samples/toolbarconfigurator/font/LICENSE.txt10
-rw-r--r--release/samples/toolbarconfigurator/font/config.json28
-rw-r--r--release/samples/toolbarconfigurator/font/fontello.eotbin0 -> 4988 bytes
-rw-r--r--release/samples/toolbarconfigurator/font/fontello.svg14
-rw-r--r--release/samples/toolbarconfigurator/font/fontello.ttfbin0 -> 4820 bytes
-rw-r--r--release/samples/toolbarconfigurator/font/fontello.woffbin0 -> 2904 bytes
-rw-r--r--release/samples/toolbarconfigurator/index.html446
-rw-r--r--release/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js13
-rw-r--r--release/samples/toolbarconfigurator/js/fulltoolbareditor.js9
-rw-r--r--release/samples/toolbarconfigurator/js/toolbarmodifier.js33
-rw-r--r--release/samples/toolbarconfigurator/js/toolbartextmodifier.js14
-rw-r--r--release/samples/toolbarconfigurator/lib/codemirror/LICENSE19
-rw-r--r--release/samples/toolbarconfigurator/lib/codemirror/codemirror.css325
-rw-r--r--release/samples/toolbarconfigurator/lib/codemirror/codemirror.js288
-rw-r--r--release/samples/toolbarconfigurator/lib/codemirror/javascript.js25
-rw-r--r--release/samples/toolbarconfigurator/lib/codemirror/neo.css36
-rw-r--r--release/samples/toolbarconfigurator/lib/codemirror/show-hint.css38
-rw-r--r--release/samples/toolbarconfigurator/lib/codemirror/show-hint.js16
64 files changed, 7778 insertions, 0 deletions
diff --git a/release/samples/css/samples.css b/release/samples/css/samples.css
new file mode 100644
index 0000000..f1973d0
--- /dev/null
+++ b/release/samples/css/samples.css
@@ -0,0 +1,1632 @@
1/**
2 * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license
4 */
5@media (max-width: 900px) {
6 .global-is-mobile-hidden {
7 display: none !important;
8 }
9}
10article,
11aside,
12details,
13figcaption,
14figure,
15footer,
16header,
17hgroup,
18main,
19menu,
20nav,
21section {
22 display: block;
23}
24body,
25html {
26 margin: 0;
27 padding: 0;
28 font: 16px / 1.8 Arial, 'Helvetica Neue', Helvetica, sans-serif;
29 font-weight: 300;
30 color: #575757;
31}
32.grid-width-10 {
33 width: 10%;
34}
35.grid-width-20 {
36 width: 20%;
37}
38.grid-width-30 {
39 width: 30%;
40}
41.grid-width-40 {
42 width: 40%;
43}
44.grid-width-50 {
45 width: 50%;
46}
47.grid-width-60 {
48 width: 60%;
49}
50.grid-width-70 {
51 width: 70%;
52}
53.grid-width-80 {
54 width: 80%;
55}
56.grid-width-90 {
57 width: 90%;
58}
59.grid-width-100 {
60 width: 100%;
61}
62@media (max-width: 900px) {
63 .grid-width-10,
64 .grid-width-20,
65 .grid-width-30,
66 .grid-width-40,
67 .grid-width-50,
68 .grid-width-60,
69 .grid-width-70,
70 .grid-width-80,
71 .grid-width-90,
72 .grid-width-100 {
73 width: 100%;
74 }
75}
76*[class*="grid-width"] {
77 -webkit-box-sizing: border-box;
78 -moz-box-sizing: border-box;
79 box-sizing: border-box;
80 padding-left: 4%;
81 padding-right: 4%;
82 float: left;
83}
84*[class*="grid-width"]:after,
85.grid-container:after,
86*[class*="grid-width"]:before,
87.grid-container:before {
88 content: '';
89 display: block;
90 overflow: hidden;
91 visibility: hidden;
92 font-size: 0;
93 line-height: 0;
94 width: 0;
95 height: 0;
96}
97*[class*="grid-width"]:after,
98.grid-container:after {
99 clear: both;
100}
101.grid-container {
102 -webkit-box-sizing: border-box;
103 -moz-box-sizing: border-box;
104 box-sizing: border-box;
105 margin-left: auto;
106 margin-right: auto;
107}
108.grid-container-nested *[class*="grid-width"]:first-child {
109 padding-left: 0;
110}
111.grid-container-nested *[class*="grid-width"]:last-child {
112 padding-right: 0;
113}
114@media (max-width: 900px) {
115 .grid-container-nested *[class*="grid-width"]:first-child {
116 padding-left: 4%;
117 }
118 .grid-container-nested *[class*="grid-width"]:last-child {
119 padding-right: 4%;
120 }
121}
122.header-a {
123 min-height: 140px;
124 overflow: hidden;
125}
126.header-a .header-a-logo {
127 margin: 40px 0 0;
128}
129@media (max-width: 900px) {
130 .header-a .header-a-logo {
131 text-align: center;
132 }
133}
134.header-a .header-a-logo img {
135 border: transparent;
136}
137.navigation-a {
138 height: 30px;
139 background: #3D3D3D;
140 position: absolute;
141 left: 0;
142 right: 0;
143 top: 0;
144 padding: 0;
145 overflow: hidden;
146}
147@media (max-width: 900px) {
148 .navigation-a {
149 text-align: center;
150 }
151}
152.navigation-a ul {
153 list-style: none;
154 margin: 0;
155 overflow: hidden;
156}
157.navigation-a ul li,
158.navigation-a ul li a {
159 display: inline-block;
160}
161@media (max-width: 900px) {
162 .navigation-a ul {
163 width: auto;
164 text-overflow: ellipsis;
165 white-space: nowrap;
166 display: inline-block;
167 float: none;
168 }
169 .navigation-a ul:before,
170 .navigation-a ul:after {
171 display: none;
172 }
173}
174.navigation-a ul.navigation-a-left {
175 text-align: left;
176}
177@media (max-width: 900px) {
178 .navigation-a ul.navigation-a-left {
179 padding-right: 0;
180 }
181}
182.navigation-a ul.navigation-a-right {
183 text-align: right;
184}
185@media (max-width: 900px) {
186 .navigation-a ul.navigation-a-right {
187 padding-left: 23px;
188 }
189}
190.navigation-a ul li + li {
191 margin-left: 23px;
192}
193.navigation-a ul li a {
194 font-size: 10px;
195 font-size: 0.625rem;
196 line-height: 18px;
197 line-height: 1.13rem;
198 line-height: 30px;
199 float: left;
200 color: #ddd;
201 font-weight: bold;
202 text-decoration: none;
203 text-transform: uppercase;
204}
205.navigation-a ul li a:hover {
206 cursor: pointer;
207 color: #fff;
208}
209.icon-navigation-a-github:before,
210.icon-navigation-a-github:after {
211 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAAAXNSR0IArs4c6QAAAa9JREFUOBGNlM8rRGEUht0pDGosjKYZpUSIkuwsiCaxUEqK2VOUBcrWv2BjxUJho6wsLLDzY2fhD5iR5NeOcJvIjOfM3O927m3mmlPPnPec835nZprvjlVVJvL5fCOjMWiDCLzCLVxZlpUj/x8saYV9+IZS8UJzFWoCt2GYgk+oJG4wJUouZDANv5VsUZ47dNSzkEYHfIDEHixDWgoiB/rTHlPPwBNInPmXHRb7hdeUDFG10AN1Th1Fd5mD6BMwMVnoUyVA3t3EkjkQlDFfmwPkc7NsQTXf0bGgJWaGb16dk18+EmLYawzkC+6Q3KdK4kiZqtGdskx/kmdlCJS86RuGrDLFZJmtGi1KB0q+VhOGsDLZsiyjGsOY4qoOkrO+YUauwCDoOKWo9xk9JfM+MPdSzqZdA8UlyDO3AvKLPsIG9LsmBHUKduEHdCy6PrpJZyKXdwKMOemaissOHJ9O9xTeh57GluMYIsehWy8STW/d8ZhkI0b9PjFasA1fsAOb0KCN1PLXYyKLGNdzj2YYArnZDyDRrA3Ua4UuDzd5QM/KaoxhmAO5Om5Qt8OI2/CJP6MVa1dvltQ5AAAAAElFTkSuQmCC");
212}
213.navigation-b {
214 text-align: right;
215 margin: 52px 0 0;
216 overflow: visible;
217}
218@media (max-width: 900px) {
219 .navigation-b {
220 text-align: center;
221 margin-top: 20px;
222 padding: 0;
223 }
224}
225.navigation-b ul {
226 padding: 0;
227 list-style: none;
228 margin: 0;
229 overflow: visible;
230}
231.navigation-b ul li,
232.navigation-b ul li a {
233 display: inline-block;
234}
235@media (max-width: 900px) {
236 .navigation-b ul {
237 display: table;
238 width: 100%;
239 padding-bottom: 1.5em;
240 }
241}
242@media (max-width: 900px) {
243 .navigation-b ul li {
244 display: table-row;
245 }
246}
247.navigation-b ul li + li {
248 margin-left: 20px;
249}
250@media (max-width: 900px) {
251 .navigation-b ul li + li {
252 margin-left: 0;
253 }
254}
255.navigation-b ul li a {
256 -webkit-box-sizing: border-box;
257 -moz-box-sizing: border-box;
258 box-sizing: border-box;
259 text-transform: uppercase;
260 text-decoration: none;
261 outline: none;
262}
263@media (max-width: 900px) {
264 .navigation-b ul li a {
265 width: 100%;
266 -webkit-border-radius: 0;
267 -webkit-background-clip: padding-box;
268 -moz-border-radius: 0;
269 -moz-background-clip: padding;
270 border-radius: 0;
271 background-clip: padding-box;
272 }
273}
274.footer-a {
275 font-size: 13px;
276 font-size: 0.8125rem;
277 line-height: 23.4px;
278 line-height: 1.46rem;
279 padding-top: 2.25em;
280 padding-bottom: 2.25em;
281 overflow: hidden;
282 color: #8a8a8a;
283}
284.footer-a a {
285 color: #27C0D8;
286 text-decoration: none;
287 border-bottom: 1px dotted #27C0D8;
288}
289.footer-a a:hover {
290 color: #23adc2;
291}
292.footer-a p {
293 margin: 0;
294 display: inline-block;
295 text-align: center;
296}
297.content {
298 font-size: 14px;
299 font-size: 0.875rem;
300 line-height: 25.2px;
301 line-height: 1.57rem;
302 overflow: hidden;
303 padding-top: 1.5em;
304 padding-bottom: 1.5em;
305}
306.content p {
307 margin: 0.75em 0;
308}
309.content ul,
310.content ol,
311.content pre,
312.content blockquote,
313.content textarea:not([class^="cke"]),
314.content .cke {
315 margin: 1.875em 0;
316}
317.content code,
318.content kbd {
319 -webkit-border-radius: 3px;
320 -webkit-background-clip: padding-box;
321 -moz-border-radius: 3px;
322 -moz-background-clip: padding;
323 border-radius: 3px;
324 background-clip: padding-box;
325 padding: 3px 4px;
326}
327.content pre,
328.content code,
329.content kbd,
330.content blockquote {
331 background: #f5f5f5;
332}
333.content blockquote,
334.content pre {
335 background: none;
336 border-left: 4px solid #27C0D8;
337 padding: 1.5em 2.25em;
338}
339.content p a,
340.content ul a,
341.content ol a,
342.content blockquote a,
343.content h1 a,
344.content h2 a,
345.content h3 a,
346.content h4 a,
347.content h5 a {
348 color: #27C0D8;
349 text-decoration: none;
350 border-bottom: 1px dotted #27C0D8;
351}
352.content p a:hover,
353.content ul a:hover,
354.content ol a:hover,
355.content blockquote a:hover,
356.content h1 a:hover,
357.content h2 a:hover,
358.content h3 a:hover,
359.content h4 a:hover,
360.content h5 a:hover {
361 color: #23adc2;
362}
363.content h1,
364.content h2,
365.content h3,
366.content h4,
367.content h5 {
368 color: #000;
369 font-weight: 100;
370}
371.content h1 code,
372.content h2 code,
373.content h3 code,
374.content h4 code,
375.content h5 code,
376.content h1 kbd,
377.content h2 kbd,
378.content h3 kbd,
379.content h4 kbd,
380.content h5 kbd {
381 font-size: inherit;
382}
383.content h1 a.content-heading-anchor,
384.content h2 a.content-heading-anchor,
385.content h3 a.content-heading-anchor,
386.content h4 a.content-heading-anchor,
387.content h5 a.content-heading-anchor {
388 font-weight: 100;
389 vertical-align: middle;
390 opacity: 0;
391 border: 0;
392}
393.content h1:hover a.content-heading-anchor,
394.content h2:hover a.content-heading-anchor,
395.content h3:hover a.content-heading-anchor,
396.content h4:hover a.content-heading-anchor,
397.content h5:hover a.content-heading-anchor {
398 opacity: 1;
399}
400.content h1:target a,
401.content h2:target a,
402.content h3:target a,
403.content h4:target a,
404.content h5:target a {
405 -webkit-animation: targetLinkOpacity 0.5s linear alternate;
406 -moz-animation: targetLinkOpacity 0.5s linear alternate;
407 -o-animation: targetLinkOpacity 0.5s linear alternate;
408 animation: targetLinkOpacity 0.5s linear alternate;
409 opacity: 1;
410}
411.content input,
412.content select,
413.content textarea:not([class^="cke"]) {
414 -webkit-border-radius: 3px;
415 -webkit-background-clip: padding-box;
416 -moz-border-radius: 3px;
417 -moz-background-clip: padding;
418 border-radius: 3px;
419 background-clip: padding-box;
420 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.08);
421 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.08);
422 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.08);
423 font: inherit;
424 color: inherit;
425 border: 1px solid #D9D9D9;
426 padding: .2em .5em;
427}
428.content input:focus,
429.content select:focus,
430.content textarea:not([class^="cke"]):focus {
431 border-color: #66afe9;
432 outline: 0;
433 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.08), 0 0 8px #93c6ef;
434 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.08), 0 0 8px #93c6ef;
435 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.08), 0 0 8px #93c6ef;
436}
437.content abbr {
438 border-bottom: 1px dotted #666;
439 cursor: pointer;
440}
441.content blockquote {
442 font-style: italic;
443 font-family: Georgia, Times, "Times New Roman", serif;
444 font-size: 16px;
445 font-size: 1rem;
446 line-height: 28.8px;
447 line-height: 1.8rem;
448}
449.content em {
450 font-style: italic;
451}
452.content h1 {
453 font-size: 36px;
454 font-size: 2.25rem;
455 line-height: 64.8px;
456 line-height: 4.05rem;
457 margin: 1.125em 0 0;
458}
459.content h2 {
460 font-size: 27.2px;
461 font-size: 1.7rem;
462 line-height: 48.96px;
463 line-height: 3.06rem;
464 margin: 0.9em 0 0;
465}
466.content h3 {
467 font-size: 24px;
468 font-size: 1.5rem;
469 line-height: 43.2px;
470 line-height: 2.7rem;
471 font-weight: 500;
472 margin: 0.75em 0 0;
473}
474.content h4 {
475 font-size: 19.2px;
476 font-size: 1.2rem;
477 line-height: 34.56px;
478 line-height: 2.16rem;
479 font-weight: 500;
480 margin: 0.75em 0 0;
481}
482.content h5 {
483 font-size: 17.6px;
484 font-size: 1.1rem;
485 line-height: 31.68px;
486 line-height: 1.98rem;
487 font-weight: 500;
488 margin: 0.75em 0 0;
489}
490.content hr {
491 border: 0;
492 border-top: 4px solid #D9D9D9;
493 margin: 1.5em 0;
494}
495.content input[type="text"] {
496 height: 1.8em;
497 line-height: 1.8em;
498}
499.content input[type="button"] {
500 -webkit-appearance: button;
501 -moz-appearance: button;
502 appearance: button;
503}
504.content kbd {
505 font-size: 12px;
506 font-size: 0.75rem;
507 line-height: 21.6px;
508 line-height: 1.35rem;
509 font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
510 padding: 2px 6px;
511 -webkit-box-shadow: 0 0 4px #fff inset, 0 2px 0 #D9D9D9;
512 -moz-box-shadow: 0 0 4px #fff inset, 0 2px 0 #D9D9D9;
513 box-shadow: 0 0 4px #fff inset, 0 2px 0 #D9D9D9;
514}
515.content p img {
516 vertical-align: middle;
517}
518.content p pre {
519 padding: 1.5em;
520}
521.content pre {
522 padding: 0;
523 border: 0;
524 tab-size: 4;
525 -o-tab-size: 4;
526 -moz-tab-size: 4;
527}
528.content pre,
529.content code {
530 font-size: 11.89px;
531 font-size: 0.743rem;
532 line-height: 21.4px;
533 line-height: 1.34rem;
534 font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;
535}
536.content pre a,
537.content code a {
538 border: 0;
539}
540.content pre code {
541 padding: 0.75em;
542 display: block;
543}
544.content strong {
545 color: #000;
546}
547.content ul ul,
548.content ol ul,
549.content ul ol,
550.content ol ol {
551 margin: 0.75em 0;
552}
553.content ul li,
554.content ol li {
555 font-size: 14px;
556 font-size: 0.875rem;
557 line-height: 30.24px;
558 line-height: 1.89rem;
559}
560.content textarea:not([class^="cke"]) {
561 width: 100%;
562}
563.content div.todo {
564 border: 2px dotted #444;
565 padding: 10px;
566 margin: 60px 0 10px 0;
567 /* Remove me some day */
568}
569.content div.todo:before {
570 content: "TODO";
571 font-weight: bold;
572}
573body a.button-a,
574body button.button-a,
575body input.button-a {
576 -webkit-border-radius: 3px;
577 -webkit-background-clip: padding-box;
578 -moz-border-radius: 3px;
579 -moz-background-clip: padding;
580 border-radius: 3px;
581 background-clip: padding-box;
582 font-size: 14px;
583 font-size: 0.875rem;
584 line-height: 25.2px;
585 line-height: 1.57rem;
586 height: 36px;
587 line-height: 36px;
588 padding: 0 1.1em;
589 font-weight: 700;
590 color: #3e3e3e;
591 white-space: nowrap;
592 text-decoration: none;
593 display: inline-block;
594 cursor: pointer;
595 border: 0;
596 vertical-align: middle;
597 margin: 1px 0;
598 background: transparent;
599}
600body a.button-a.icon-pos-left,
601body button.button-a.icon-pos-left,
602body input.button-a.icon-pos-left {
603 padding-left: .8em;
604}
605body a.button-a.icon-pos-right,
606body button.button-a.icon-pos-right,
607body input.button-a.icon-pos-right {
608 padding-right: .8em;
609}
610body a.button-a.button-a-no-text,
611body button.button-a.button-a-no-text,
612body input.button-a.button-a-no-text {
613 -webkit-border-radius: 100px;
614 -webkit-background-clip: padding-box;
615 -moz-border-radius: 100px;
616 -moz-background-clip: padding;
617 border-radius: 100px;
618 background-clip: padding-box;
619 width: 36px;
620 padding: 0;
621 text-indent: -999px;
622 overflow: hidden;
623 position: relative;
624 text-align: center;
625}
626body a.button-a.button-a-no-text:before,
627body button.button-a.button-a-no-text:before,
628body input.button-a.button-a-no-text:before {
629 position: absolute;
630 left: 50%;
631 top: 50%;
632 margin: -9px 0 0 -9px;
633}
634@media (max-width: 900px) {
635 body a.button-a.button-a-mobile-collapsed,
636 body button.button-a.button-a-mobile-collapsed,
637 body input.button-a.button-a-mobile-collapsed {
638 -webkit-border-radius: 100px;
639 -webkit-background-clip: padding-box;
640 -moz-border-radius: 100px;
641 -moz-background-clip: padding;
642 border-radius: 100px;
643 background-clip: padding-box;
644 width: 36px;
645 padding: 0;
646 text-indent: -999px;
647 overflow: hidden;
648 position: relative;
649 text-align: center;
650 }
651 body a.button-a.button-a-mobile-collapsed:before,
652 body button.button-a.button-a-mobile-collapsed:before,
653 body input.button-a.button-a-mobile-collapsed:before {
654 position: absolute;
655 left: 50%;
656 top: 50%;
657 margin: -9px 0 0 -9px;
658 }
659 body a.button-a.button-a-mobile-collapsed:before,
660 body button.button-a.button-a-mobile-collapsed:before,
661 body input.button-a.button-a-mobile-collapsed:before {
662 position: absolute;
663 left: 50%;
664 top: 50%;
665 margin: -9px 0 0 -9px;
666 }
667}
668body a.button-a:active,
669body button.button-a:active,
670body input.button-a:active,
671body a.button-a:hover,
672body button.button-a:hover,
673body input.button-a:hover {
674 color: #fff;
675 background: #23adc2;
676}
677body a.button-a:focus,
678body button.button-a:focus,
679body input.button-a:focus {
680 border-color: #66afe9;
681 outline: 0;
682 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px #93c6ef;
683 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px #93c6ef;
684 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px #93c6ef;
685}
686body a.button-a-soft,
687body button.button-a-soft,
688body input.button-a-soft {
689 background: #e7e7e7;
690}
691body a.button-a-soft:active,
692body button.button-a-soft:active,
693body input.button-a-soft:active,
694body a.button-a-soft:hover,
695body button.button-a-soft:hover,
696body input.button-a-soft:hover {
697 color: #3e3e3e;
698 background: #cecece;
699}
700body a.button-a-background,
701body button.button-a-background,
702body input.button-a-background,
703body a.navigation-b ul li a:hover,
704body button.navigation-b ul li a:hover,
705body input.navigation-b ul li a:hover {
706 color: #fff;
707 background: #27C0D8;
708}
709body a.button-a-background:active,
710body button.button-a-background:active,
711body input.button-a-background:active,
712body a.button-a-background:hover,
713body button.button-a-background:hover,
714body input.button-a-background:hover,
715body a.navigation-b ul li a:hover:active,
716body button.navigation-b ul li a:hover:active,
717body input.navigation-b ul li a:hover:active,
718body a.navigation-b ul li a:hover:hover,
719body button.navigation-b ul li a:hover:hover,
720body input.navigation-b ul li a:hover:hover {
721 color: #fff;
722 background: #23adc2;
723}
724.balloon-a {
725 font-size: 12px;
726 font-size: 0.75rem;
727 line-height: 21.6px;
728 line-height: 1.35rem;
729 -webkit-border-radius: 3px;
730 -webkit-background-clip: padding-box;
731 -moz-border-radius: 3px;
732 -moz-background-clip: padding;
733 border-radius: 3px;
734 background-clip: padding-box;
735 border-bottom: 3px solid #d4d4d4;
736 background: #ebebeb;
737 display: inline-block;
738 white-space: nowrap;
739 padding: .4em 1.2em .2em;
740 font-weight: 700;
741 position: relative;
742 z-index: 1000;
743 text-transform: none;
744 color: #575757;
745}
746.balloon-a:hover {
747 color: #575757;
748}
749.balloon-a:before {
750 content: '';
751 width: 0;
752 height: 0;
753 border-style: solid;
754 position: absolute;
755}
756.balloon-a-ne:before,
757.balloon-a-nw:before {
758 top: -13px;
759 border-width: 0 9px 15.6px 9px;
760 border-color: transparent transparent #ebebeb transparent;
761}
762.balloon-a-se:before,
763.balloon-a-sw:before {
764 bottom: -13px;
765 border-width: 15.6px 9px 0 9px;
766 border-color: #ebebeb transparent transparent transparent;
767}
768.balloon-a-nw:before,
769.balloon-a-sw:before {
770 left: 20px;
771}
772.balloon-a-ne:before,
773.balloon-a-se:before {
774 right: 20px;
775}
776.icon-pos-left:before,
777.icon-pos-right:after {
778 content: '';
779 display: inline-block;
780 width: 18px;
781 height: 18px;
782 vertical-align: middle;
783 background-repeat: no-repeat;
784}
785.icon-pos-left:before {
786 margin-right: 10px;
787}
788.icon-pos-right:after {
789 margin-left: 10px;
790}
791.icon-download:before,
792.icon-download:after {
793 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAQFJREFUOBGtVDESgjAQBGfobHwE/AIa/AN/8EEWfMWGZ+gDaG2ws8BdyY13SRgGcGducre3WQ5NSJIIxnGsES3ijhhcMCdXR7ZYCqIc0SGWQE1ud7sKjRLxXHJQfWpLYwaCk6wxET/u+U2GIngd8yRViINau28bBH/YAGqvSQPhRNQHqBqj3FY0NKq27TW7qhSTDaCOhkaRAj7Hmm8S4V+c6C+gUa+crsizuWmoc70MKbWCnqPy2GvcUJxE4a/sIajRaGkU+/sf4IuISQGePR/T/QMbHEhwPLVnMWPuOCwGnWg41dwVeaN3ccHch70idIRi/6WV0WC2/zMiZm661R+2DxyEdjTuST3mAAAAAElFTkSuQmCC");
794}
795.icon-question-mark:before,
796.icon-question-mark:after {
797 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAUhJREFUOBGllLFOAkEQhjk0WthT2JFA7Czsqc7OxFLewEeAZ/AVbO0tTLTSBKhstTBUNkYLEoVAbD2//zILe5e9uwCT/JnZmX/+m83ebq0WsCRJYnANxmBhUKxcHGjJpiC1wQBUmTjtbLetKHTAT5WCVxe3kxEjoUmKRL6pvYEZyJt6VpOxCG3nmfyx+yJxBM7BFPg2SDlkTv2sxZqi4YnUvfgswI9FuHAkzz9EUTTRmqYeTifXsvoj/s9i57oi6ljz9kviFdyBCbgHe+rCn4C8jVXQ18rshuKOiTSIXwLkRZWQTurARJrE7wERpea7kD7BkcgB+yB3CFGlPmgqCNiXhEagSGif2qU1Ln8FW/tupK3pXhXZrWNDuCoikY/rHPMT5KFr2MAPTSM90rIrUjJIeq1WV0RTwN7+0rrtILb9M+LEbLq1H7Z/Ea3+RvBddl0AAAAASUVORK5CYII=");
798}
799.icon-close:before,
800.icon-close:after {
801 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAUlJREFUOBGllDFuwzAMRe3Cd+jYKUCzd/XkDtm9dsoVOuUqBnqBoodwgBwiW8ZsXTIWqPu+Iia0LMAoTOBbJEV+UZTkosjIMAwN6MARXCKky9dkUsYuglagB3OimNU4O1pM1OB7jsHNK7YekeFQJZ5kj/0LcnLA+RMnlHOvDMNv5wO7BFuQkn3hq0ALjKwPVeF4BSaqpLRy0T1ZIHFz75bE2BR8dBImqmBrwRplg09QmR/9GZyBSadAHauXCZkRROKURLlHEemepJIlIyhHotzLg1/N6erTxtmmvqA8muHGIbc1rTBqrEuwnqWnGbbmmz0hwaHtvM2QhWbrXZnosvnTWWPrdCY9w7cDJtf3h9VHjy5Zq9UZ08beyJh7Aicg6W/VYvgnIjJdNn9PMIOITJWcgnV9VvcnEitY/mitNFZZ/hsxsljdv39sfybRQ4R/kU0MAAAAAElFTkSuQmCC");
802}
803.ie8 .switch > * {
804 vertical-align: middle;
805}
806.ie8 .switch input[type="radio"] {
807 margin: 0 0.25em;
808 display: inline-block;
809}
810.ie8 .switch label {
811 margin-left: 0 !important;
812 margin-right: 0 !important;
813}
814.ie8 .switch label[data-for="1"] {
815 float: left;
816}
817.ie8 .switch label[data-for="2"] {
818 float: right;
819}
820.ie8 .switch .switch-inner {
821 display: none;
822}
823.switch {
824 font-size: 14px;
825 font-size: 0.875rem;
826 line-height: 25.2px;
827 line-height: 1.57rem;
828 font-weight: bold;
829 background-color: #27C0D8;
830 overflow: hidden;
831 display: inline-block;
832 padding: 0.75em 0.25em;
833 color: #fff;
834 -webkit-border-radius: 3px;
835 -webkit-background-clip: padding-box;
836 -moz-border-radius: 3px;
837 -moz-background-clip: padding;
838 border-radius: 3px;
839 background-clip: padding-box;
840 position: relative;
841}
842.switch input[type="radio"] {
843 display: none;
844}
845.switch label {
846 position: relative;
847 z-index: 2;
848 float: left;
849 cursor: pointer;
850 padding: 0 0.75em;
851}
852.switch label:hover {
853 text-decoration: underline;
854}
855.switch .switch-inner {
856 float: left;
857 background-color: #FFF;
858 height: 1.5em;
859 width: 4.125em;
860 padding: 2px;
861 margin: 0 0.25em;
862 -webkit-border-radius: 5.5px;
863 -webkit-background-clip: padding-box;
864 -moz-border-radius: 5.5px;
865 -moz-background-clip: padding;
866 border-radius: 5.5px;
867 background-clip: padding-box;
868}
869.switch .switch-inner .handler {
870 overflow: hidden;
871 position: relative;
872 display: block;
873 height: 1.5em;
874 width: 1.5em;
875 background: #25b4cb;
876 -webkit-border-radius: 4.5px;
877 -webkit-background-clip: padding-box;
878 -moz-border-radius: 4.5px;
879 -moz-background-clip: padding;
880 border-radius: 4.5px;
881 background-clip: padding-box;
882}
883.switch .switch-inner .handler:before {
884 content: '';
885 display: block;
886 position: absolute;
887 top: 0;
888 right: 0;
889 bottom: 3px;
890 left: 0;
891 background-color: #34c4da;
892 -webkit-border-bottom-left-radius: 4.5px;
893 -moz-border-radius-bottomleft: 4.5px;
894 border-bottom-left-radius: 4.5px;
895 -webkit-border-bottom-right-radius: 4.5px;
896 -webkit-background-clip: padding-box;
897 -moz-border-radius-bottomright: 4.5px;
898 -moz-background-clip: padding;
899 border-bottom-right-radius: 4.5px;
900 background-clip: padding-box;
901}
902.switch:hover .switch-inner .handler:before {
903 background: #45c9dd;
904}
905.switch input[data-num="2"]:checked ~ .switch-inner > .handler {
906 margin-left: auto;
907}
908.switch input[data-num="2"]:checked ~ label[data-for="1"] {
909 padding-right: 5.125em;
910 margin-right: -4.375em;
911}
912.switch input[data-num="1"]:checked ~ label[data-for="2"] {
913 padding-left: 5.125em;
914 margin-left: -4.375em;
915}
916.toggler {
917 -webkit-user-select: none;
918 -moz-user-select: none;
919 -ms-user-select: none;
920 user-select: none;
921}
922.toggler label {
923 cursor: pointer;
924}
925.toggler [data-collapse] {
926 display: inherit;
927}
928.toggler [data-expand] {
929 display: none;
930}
931.toggler.collapsed [data-collapse] {
932 display: none;
933}
934.toggler.collapsed [data-expand] {
935 display: inherit;
936}
937.toggler-container {
938 overflow: hidden;
939}
940.toggler-container.collapsed {
941 height: 0;
942}
943.icon-toggler-expanded:before,
944.icon-toggler-collapsed:before,
945.icon-toggler-expanded:after,
946.icon-toggler-collapsed:after {
947 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAByCAYAAABeOoENAAAAAXNSR0IArs4c6QAAAbxJREFUaAXtmT1KBEEQhRdFQdBEMfQEBoaGopl3MfECXsFERLyBh/AUIuwJDEUQM//eB11Dz1A1uzotGFTBY2rr58306+kNpmazP7Z98V8Kj8JrAT4xcgttXRVXwofwFYAcNdS6RuJegOBTuBUOhc0CfGLkqKHWJeMuFDwJJ0Jk5Kihlp6esW4embuNkVgTNdTS09MMEbkDj76sUUsPvZ2xIwTRATsQuBuxGsTIYdSSo7cztpggwprdyKlJ8ImZUUuM3s48ol1lXwQjwydm5hINl2bF53KMCL82d2mR2GvqnBfg1+aKPbb9p+oGtYXbT1GTFxKiZkfEyHgy7x0y0clR454zSGpDMzaA3fzV30hNln4qkAqkAqlAKpAKpAKpQCqQCqQCqUAqkAqkAqlAKpAKpAKpQCrw3xWY/GGcz++TP9U3Gx40GWdEAxabXA33NBywRCOfdzFcCztDJv12Rz7REMpmIc9qPBNWK0J3COWNxegxIrs+KHZcyHpjsZUSXPaypcLtseJFS3tT84WwUZG4S4vEZkl3wl5FYK4rdrT9R9Y1uIbbT12TFxKiZkfEyCYfWojMJv+NGNGPr99GI9DP7P9TCgAAAABJRU5ErkJggg==");
948}
949.icon-toggler-expanded.icon-light:before,
950.icon-toggler-collapsed.icon-light:before,
951.icon-toggler-expanded.icon-light:after,
952.icon-toggler-collapsed.icon-light:after {
953 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAByCAYAAABeOoENAAAAAXNSR0IArs4c6QAAAcVJREFUaAXtmT9KA1EQxhMlASE2SkpPkCJlStHOu3gGwRPYBAm5gYfwFBKwtrARRAh26vr7ljfx7TrLChtBcAa+zOSbPy/7vcTC6fV+04qimIArsALrBMXiJq1nUzQEc/AOmkw51QzdgUqAWyD7AEswA6MExeKUk6n2+zBInSJ7BKfuaZDKpRpcMa/UQUgTfWSd1jjEmlSTatXzpRlvJKJsacVtXrVlB72bWgjdiGwmEj8FOq1u4qapRprJVvkgXbFsZCTxomSqL4ssr0uQrY3TJ/AGjeFfVJlM8diaiCuDdlLiIfmNcP1+/wnu0hoVJ84oq7XeUhNXbE4dgPuEgU2Qh3PFbrx+Gs6E2hD/+tMJ3b+QadB2fiLZsG4/2poG3f6M5MMiDgVCgVAgFAgFQoFQIBQIBUKBUCAUCAVCgVAgFAgFQoFQIBQIBf66AiwLuv1jnAH/Zb/Go5abq/qdwvsLFhJNK583ctfg0Bnmrnwq+zVrYoDZM8E52M1yP9uvqcGmZP6O+CTl3LWYHdTm9yk4aCzilLZHe6XmAuzZEGL30ZrEpr64AUc2wDycK7a7X6P42BpzD+9fv4pIxn4tWznnwm0r/gQpiG1tFshTowAAAABJRU5ErkJggg==");
954}
955.icon-toggler-expanded:before,
956.icon-toggler-expanded:after {
957 background-position: top left;
958}
959.icon-toggler-collapsed:before,
960.icon-toggler-collapsed:after {
961 background-position: bottom left;
962}
963.modal {
964 padding: 20px;
965 border-radius: 3px;
966 background-color: white;
967 max-width: 700px;
968 -webkit-box-sizing: border-box;
969 -moz-box-sizing: border-box;
970 box-sizing: border-box;
971 width: 80% !important;
972 top: 50% !important;
973 -webkit-transform: translate(-50%, -50%) !important;
974 -moz-transform: translate(-50%, -50%) !important;
975 -o-transform: translate(-50%, -50%) !important;
976 -ms-transform: translate(-50%, -50%) !important;
977 transform: translate(-50%, -50%) !important;
978}
979.modal-close {
980 -webkit-border-radius: 100px;
981 -webkit-background-clip: padding-box;
982 -moz-border-radius: 100px;
983 -moz-background-clip: padding;
984 border-radius: 100px;
985 background-clip: padding-box;
986 cursor: pointer;
987 height: 18px;
988 width: 18px;
989 position: absolute;
990 top: 10px;
991 right: 10px;
992 font-size: 17px;
993 text-align: center;
994 line-height: 19px;
995 background: #cccccc;
996}
997main .grid-container,
998header .grid-container,
999.navigation-a > div,
1000footer > div {
1001 max-width: 968px;
1002}
1003.header-a {
1004 margin-top: 30px;
1005}
1006.footer-a {
1007 border-top: 1px solid #D9D9D9;
1008}
1009.adjoined-top {
1010 background-color: #27C0D8;
1011 color: #fff;
1012}
1013.adjoined-top .content h1,
1014.adjoined-top .content h2,
1015.adjoined-top .content h3,
1016.adjoined-top .content h4,
1017.adjoined-top .content h5 {
1018 color: #fff;
1019}
1020.adjoined-top .content p {
1021 font-size: 18px;
1022 font-size: 1.125rem;
1023 line-height: 32.4px;
1024 line-height: 2.02rem;
1025 font-weight: 100;
1026}
1027.adjoined-top .content p a {
1028 text-decoration: none;
1029 border-bottom: 1px dotted #fff;
1030 color: inherit;
1031}
1032.adjoined-top .content p a:hover {
1033 color: #e6e6e6;
1034}
1035.adjoined-top .content button {
1036 color: #fff;
1037}
1038.adjoined-top .content strong {
1039 color: #fff;
1040}
1041.adjoined-top .content code {
1042 font-size: inherit;
1043 color: #27C0D8;
1044}
1045.adjoined-bottom {
1046 position: relative;
1047}
1048.adjoined-bottom:before {
1049 z-index: -1;
1050 content: '';
1051 background: #27C0D8;
1052 position: absolute;
1053 top: 0;
1054 left: 0;
1055 right: 0;
1056 height: 50%;
1057}
1058main .grid-container,
1059header .grid-container,
1060.navigation-a > div,
1061footer > div {
1062 max-width: 1052px;
1063}
1064main .grid-container.freed-width {
1065 max-width: none;
1066}
1067.switch {
1068 background: #25b4cb;
1069 float: right;
1070 overflow: visible;
1071}
1072.switch .balloon-a {
1073 position: absolute;
1074 top: -40px;
1075 right: 50%;
1076 margin-right: -15px;
1077 background: #FFEFC1;
1078 border-bottom-color: #DCDCA4;
1079}
1080.switch .balloon-a:before {
1081 border-color: #FFEFC1 transparent transparent transparent;
1082}
1083#toolbar .editors-container {
1084 overflow: hidden;
1085 height: 0;
1086 transition: height 200ms;
1087}
1088#toolbar .editors-container.active {
1089 height: auto;
1090}
1091#main #editor {
1092 background: #FFF;
1093 padding: 2% 4%;
1094 border: dashed 5px #27C0D8;
1095}
1096#main .adjoined-top:before {
1097 height: 335px;
1098}
1099#toolbar .adjoined-top:before {
1100 height: 219px;
1101}
1102#toolbar .adjoined-top .grid-container-nested {
1103 height: 147px;
1104}
1105.content .grid-switch-magic {
1106 margin: 3.5em 0 0;
1107}
1108#info-box {
1109 padding-bottom: 0;
1110}
1111#info-box > div {
1112 width: 100%;
1113 text-align: right;
1114}
1115#info-box > div .toggler {
1116 padding-right: 0;
1117}
1118#info-box > div .toggler:hover {
1119 background: transparent;
1120 color: #000;
1121}
1122#info-box > div .toggler:hover > label {
1123 text-decoration: underline;
1124}
1125#info-box > div h2 {
1126 float: left;
1127 margin-top: 0;
1128}
1129#info-box > div#instructions-container {
1130 text-align: left;
1131}
1132#toolbarModifierWrapper {
1133 overflow: hidden;
1134 height: 0;
1135 opacity: 0;
1136 transition: height 200ms;
1137}
1138#toolbarModifierWrapper.active {
1139 height: auto;
1140 opacity: 1;
1141}
1142header {
1143 overflow: visible;
1144}
1145header div.grid-container {
1146 overflow: visible;
1147}
1148header .navigation-b {
1149 overflow: visible;
1150}
1151header .navigation-b ul {
1152 overflow: visible;
1153}
1154header .navigation-b a {
1155 position: relative;
1156}
1157header .balloon-a {
1158 position: absolute;
1159 top: 48px;
1160 left: 50%;
1161 margin-left: -35px;
1162}
1163@media (max-width: 1140px) {
1164 header .balloon-a {
1165 left: auto;
1166 margin-left: auto;
1167 right: 50%;
1168 margin-right: -35px;
1169 }
1170 header .balloon-a:before {
1171 left: auto;
1172 right: 22px;
1173 }
1174}
1175@media (max-width: 900px) {
1176 header .balloon-a {
1177 display: none;
1178 }
1179}
1180#toolbar .cke_toolbar {
1181 pointer-events: none;
1182 -webkit-user-select: none;
1183 -moz-user-select: none;
1184 -ms-user-select: none;
1185 user-select: none;
1186 cursor: default;
1187}
1188.some-toolbar-active .cke_toolbar {
1189 zoom: 1;
1190 filter: alpha(opacity=50);
1191 -webkit-opacity: 0.5;
1192 -moz-opacity: 0.5;
1193 opacity: 0.5;
1194}
1195.cke_toolbar.active {
1196 position: relative;
1197 zoom: 1;
1198 filter: alpha(opacity=100);
1199 -webkit-opacity: 1;
1200 -moz-opacity: 1;
1201 opacity: 1;
1202}
1203.cke_toolbar.active:after {
1204 content: '';
1205 display: block;
1206 position: absolute;
1207 top: 0;
1208 right: 6px;
1209 bottom: 5px;
1210 left: 0;
1211 -webkit-border-radius: 5px;
1212 -webkit-background-clip: padding-box;
1213 -moz-border-radius: 5px;
1214 -moz-background-clip: padding;
1215 border-radius: 5px;
1216 background-clip: padding-box;
1217 -webkit-box-shadow: 0px 0px 15px 3px #fff4b0;
1218 -moz-box-shadow: 0px 0px 15px 3px #fff4b0;
1219 box-shadow: 0px 0px 15px 3px #fff4b0;
1220}
1221.cke_toolbar.active .cke_toolgroup {
1222 -webkit-box-shadow: none;
1223 -moz-box-shadow: none;
1224 box-shadow: none;
1225 border-color: #e3c300;
1226}
1227.cke_toolbar.active .cke_combo,
1228.cke_toolbar.active .cke_toolgroup {
1229 position: relative;
1230 z-index: 2;
1231}
1232.cke_toolbar.active .cke_combo_button {
1233 -webkit-box-shadow: none;
1234 -moz-box-shadow: none;
1235 box-shadow: none;
1236}
1237.unselectable {
1238 -webkit-user-select: none;
1239 -moz-user-select: none;
1240 -ms-user-select: none;
1241 user-select: none;
1242}
1243.toolbar {
1244 padding: 5px 0;
1245 margin-bottom: 2.4em;
1246 overflow: hidden;
1247 background: #fff;
1248}
1249.toolbar button.button-a.cke_button {
1250 cursor: pointer;
1251 display: inline-block;
1252 padding: 4px 6px;
1253 outline: 0;
1254 border: 1px solid #a6a6a6;
1255}
1256.toolbar button.button-a.hidden {
1257 display: none;
1258}
1259.toolbar button.button-a.left {
1260 float: left;
1261 margin-right: 8px;
1262}
1263.toolbar button.button-a.right {
1264 float: right;
1265 margin-left: 8px;
1266}
1267.toolbar button.button-a .highlight {
1268 color: #ffefc1;
1269}
1270.configContainer.hidden,
1271.toolbarModifier.hidden,
1272.toolbarModifier-hints.hidden {
1273 display: none;
1274}
1275.toolbarModifier :focus,
1276.toolbar button:focus,
1277.configContainer textarea.configCode:focus {
1278 outline: none;
1279}
1280div.toolbarModifier {
1281 padding: 0;
1282 overflow: hidden;
1283 width: 100%;
1284 position: relative;
1285 display: table;
1286 border-collapse: collapse;
1287}
1288div.toolbarModifier ::-moz-focus-inner {
1289 border: 0;
1290}
1291div.toolbarModifier .empty {
1292 display: none;
1293}
1294div.toolbarModifier.empty-visible .empty {
1295 display: table-row;
1296 zoom: 1;
1297 filter: alpha(opacity=60);
1298 -webkit-opacity: 0.6;
1299 -moz-opacity: 0.6;
1300 opacity: 0.6;
1301}
1302div.toolbarModifier .empty > p {
1303 line-height: 31px;
1304}
1305div.toolbarModifier > ul {
1306 padding: 0;
1307 margin: 0;
1308 border-top: 1px solid #ccc;
1309 width: 100%;
1310}
1311div.toolbarModifier > ul[data-type="table-header"] {
1312 display: table-header-group;
1313}
1314div.toolbarModifier > ul[data-type="table-body"] {
1315 display: table-row-group;
1316}
1317div.toolbarModifier > ul p {
1318 padding: 0;
1319 margin: 0;
1320}
1321div.toolbarModifier > ul > li {
1322 display: table-row;
1323}
1324div.toolbarModifier > ul > li[data-type="header"] {
1325 font-weight: bold;
1326 user-select: none;
1327 cursor: default;
1328}
1329div.toolbarModifier > ul > li[data-type="group"],
1330div.toolbarModifier > ul > li[data-type="separator"] {
1331 border-bottom: 1px solid #ccc;
1332}
1333div.toolbarModifier > ul > li[data-type="subgroup"] {
1334 border-top: 1px solid #eee;
1335}
1336div.toolbarModifier > ul > li[data-type="subgroup"]:first-child {
1337 border-top: none;
1338}
1339div.toolbarModifier > ul > li[data-type="group"].active,
1340div.toolbarModifier > ul > li[data-type="group"]:hover,
1341div.toolbarModifier > ul > li[data-type="separator"].active,
1342div.toolbarModifier > ul > li[data-type="separator"]:hover {
1343 overflow: hidden;
1344 z-index: 2;
1345}
1346div.toolbarModifier > ul > li[data-type="group"].active,
1347div.toolbarModifier > ul > li[data-type="separator"].active,
1348div.toolbarModifier > ul > li[data-type="group"].active:hover,
1349div.toolbarModifier > ul > li[data-type="separator"].active:hover {
1350 background: #f0fafb;
1351}
1352div.toolbarModifier > ul > li[data-type="group"]:hover,
1353div.toolbarModifier > ul > li[data-type="separator"]:hover {
1354 background: #fffbe3;
1355}
1356div.toolbarModifier > ul > li[data-type="separator"] {
1357 background: #f5f5f5;
1358}
1359div.toolbarModifier > ul > li[data-type="separator"]:after {
1360 content: '';
1361 width: 100%;
1362}
1363div.toolbarModifier > ul > li[data-type="separator"] > p {
1364 padding: 2px 5px;
1365}
1366div.toolbarModifier > ul > li > p,
1367div.toolbarModifier > ul > li > ul {
1368 display: table-cell;
1369 vertical-align: middle;
1370}
1371div.toolbarModifier > ul > li p {
1372 padding-left: 5px;
1373 min-width: 200px;
1374}
1375div.toolbarModifier > ul > li p span {
1376 white-space: nowrap;
1377 cursor: default;
1378}
1379div.toolbarModifier > ul > li p span button {
1380 font-size: 12.666px;
1381 margin-right: 5px;
1382 cursor: pointer;
1383 background: #fff;
1384 -webkit-border-radius: 5px;
1385 -webkit-background-clip: padding-box;
1386 -moz-border-radius: 5px;
1387 -moz-background-clip: padding;
1388 border-radius: 5px;
1389 background-clip: padding-box;
1390 border: 1px solid #bbb;
1391 padding: 0 7px;
1392 line-height: 12px;
1393 height: 20px;
1394}
1395div.toolbarModifier > ul > li p span button:not(.disabled):hover,
1396div.toolbarModifier > ul > li p span button:not(.disabled):focus {
1397 color: #fff;
1398 background-color: #454545;
1399 border-color: transparent;
1400}
1401div.toolbarModifier > ul > li p span button.move.disabled {
1402 cursor: default;
1403 zoom: 1;
1404 filter: alpha(opacity=20);
1405 -webkit-opacity: 0.2;
1406 -moz-opacity: 0.2;
1407 opacity: 0.2;
1408}
1409div.toolbarModifier > ul > li ul {
1410 border-collapse: collapse;
1411 padding: 0;
1412 width: 100%;
1413}
1414div.toolbarModifier > ul > li ul li {
1415 display: table-row;
1416 list-style-type: none;
1417 line-height: 1;
1418}
1419div.toolbarModifier > ul > li ul li[data-type="subgroup"] {
1420 border-top: 1px solid #ddd;
1421}
1422div.toolbarModifier > ul > li ul li[data-type="subgroup"]:first-child {
1423 border-top: 0;
1424}
1425div.toolbarModifier > ul > li ul li[data-type="subgroup"] [data-type="button"] {
1426 -webkit-border-radius: 3px;
1427 -webkit-background-clip: padding-box;
1428 -moz-border-radius: 3px;
1429 -moz-background-clip: padding;
1430 border-radius: 3px;
1431 background-clip: padding-box;
1432 padding: 0 2px;
1433}
1434div.toolbarModifier > ul > li ul li[data-type="subgroup"] [data-type="button"]:focus {
1435 background: rgba(0, 0, 0, 0.04);
1436}
1437div.toolbarModifier > ul > li ul li[data-type="subgroup"] [data-type="button"] input {
1438 vertical-align: middle;
1439}
1440div.toolbarModifier > ul > li ul li > p,
1441div.toolbarModifier > ul > li ul li > ul {
1442 display: table-cell;
1443 vertical-align: middle;
1444}
1445div.toolbarModifier > ul > li ul li ul {
1446 padding: 0;
1447}
1448div.toolbarModifier > ul > li ul li ul li {
1449 padding: 0;
1450 display: inline-block;
1451 cursor: pointer;
1452 margin: 2px 5px 2px 0;
1453}
1454div.toolbarModifier > ul > li ul li ul li .cke_combo_text {
1455 cursor: pointer;
1456 white-space: nowrap;
1457}
1458div.toolbarModifier > ul > li ul li ul li .cke_toolgroup,
1459div.toolbarModifier > ul > li ul li ul li .cke_combo_button {
1460 cursor: pointer;
1461 margin: 0;
1462 vertical-align: middle;
1463 border: 1px solid #ddd;
1464 font-size: 11.41px;
1465 font-size: 0.713rem;
1466 line-height: 20.54px;
1467 line-height: 1.28rem;
1468}
1469div.toolbarModifier > .codemirror-wrapper {
1470 overflow-y: auto;
1471}
1472div.toolbarModifier-hints {
1473 float: right;
1474 width: 350px;
1475 min-width: 150px;
1476 overflow-y: auto;
1477 margin-left: 1.5em;
1478}
1479div.toolbarModifier-hints h3 {
1480 font-size: 18.08px;
1481 font-size: 1.13rem;
1482 line-height: 32.54px;
1483 line-height: 2.03rem;
1484 padding: 0.36em 1.5em;
1485 background: #f5f5f5;
1486 border-bottom: 1px solid #ddd;
1487 margin-top: 0;
1488 margin-bottom: 1.2em;
1489}
1490div.toolbarModifier-hints dl {
1491 margin-bottom: 1.2em;
1492 overflow: hidden;
1493}
1494div.toolbarModifier-hints dl .list-header {
1495 font-weight: bold;
1496 border: 0;
1497 padding-bottom: 0.6em;
1498}
1499div.toolbarModifier-hints dl > p {
1500 text-align: center;
1501}
1502div.toolbarModifier-hints dl dt {
1503 float: left;
1504 width: 9em;
1505 clear: both;
1506 text-align: right;
1507 border-top: 1px solid #ddd;
1508 padding-left: 1.5em;
1509 padding-right: .1em;
1510 -webkit-box-sizing: border-box;
1511 -moz-box-sizing: border-box;
1512 box-sizing: border-box;
1513}
1514div.toolbarModifier-hints dl dt code {
1515 background: none;
1516 border: none;
1517 vertical-align: middle;
1518}
1519div.toolbarModifier-hints dl dd {
1520 margin-left: 10em;
1521 clear: right;
1522 padding-right: 1.5em;
1523}
1524div.toolbarModifier-hints dl dd code {
1525 line-height: 2.2em;
1526}
1527div.toolbarModifier-hints dl dd:after {
1528 content: '\00a0';
1529 display: block;
1530 clear: left;
1531 float: right;
1532 height: 0;
1533 width: 0;
1534}
1535.toolbarModifier-hints,
1536.configContainer textarea.configCode,
1537.CodeMirror {
1538 -webkit-border-radius: 3px;
1539 -webkit-background-clip: padding-box;
1540 -moz-border-radius: 3px;
1541 -moz-background-clip: padding;
1542 border-radius: 3px;
1543 background-clip: padding-box;
1544 border: 1px solid #ccc;
1545 font-size: 13.01px;
1546 font-size: 0.813rem;
1547 line-height: 23.42px;
1548 line-height: 1.46rem;
1549}
1550.configContainer textarea.configCode,
1551.CodeMirror pre,
1552.CodeMirror-linenumber {
1553 font-size: 13.01px;
1554 font-size: 0.813rem;
1555 line-height: 23.42px;
1556 line-height: 1.46rem;
1557 font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;
1558}
1559.CodeMirror pre {
1560 border: none;
1561 padding: 0;
1562 margin: 0;
1563}
1564.configContainer textarea.configCode {
1565 -webkit-box-sizing: border-box;
1566 -moz-box-sizing: border-box;
1567 box-sizing: border-box;
1568 color: #575757;
1569 padding: 10px;
1570 width: 100%;
1571 min-height: 500px;
1572 margin: 0;
1573 resize: none;
1574 outline: none;
1575 -moz-tab-size: 4;
1576 tab-size: 4;
1577 white-space: pre;
1578 word-wrap: normal;
1579 overflow: auto;
1580}
1581.CodeMirror-hints.toolbar-modifier {
1582 padding: 0;
1583 color: #575757;
1584 font-size: 14px;
1585 font-size: 0.875rem;
1586 line-height: 25.2px;
1587 line-height: 1.57rem;
1588 font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;
1589}
1590.CodeMirror-hints.toolbar-modifier .CodeMirror-hint-active {
1591 color: #575757;
1592 background: #f0fafb;
1593}
1594.CodeMirror-hints.toolbar-modifier > li:hover {
1595 background: #fffbe3;
1596}
1597/* Text modifier */
1598#toolbarModifierWrapper {
1599 margin-bottom: 1.2em;
1600}
1601#toolbarModifierWrapper .invalid .CodeMirror {
1602 background: #fff8f8;
1603 border-color: red;
1604}
1605#toolbarModifierWrapper .CodeMirror {
1606 height: auto;
1607 padding: 0 0.6em;
1608}
1609.staticContainer {
1610 position: fixed;
1611 top: 0;
1612 width: 100%;
1613 z-index: 10;
1614}
1615.staticContainer > .grid-container {
1616 max-width: 1052px;
1617}
1618.staticContainer > .grid-container .inner {
1619 background: #fff;
1620}
1621.staticContainer > .grid-container .inner .toolbar {
1622 margin-bottom: 0;
1623}
1624#help {
1625 position: relative;
1626 top: -15px;
1627 left: -5px;
1628}
1629#help-content {
1630 display: none;
1631}
1632/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL25vZGVfbW9kdWxlcy9ja3NvdXJjZS1zYW1wbGVzLWZyYW1ld29yay9jb21wb25lbnRzL2dsb2JhbC9nbG9iYWwubGVzcyIsIi4uLy4uL25vZGVfbW9kdWxlcy9ja3NvdXJjZS1zYW1wbGVzLWZyYW1ld29yay9jb21wb25lbnRzL2NvcmUvY29yZS5sZXNzIiwiLi4vLi4vbm9kZV9tb2R1bGVzL2Nrc291cmNlLXNhbXBsZXMtZnJhbWV3b3JrL2NvbXBvbmVudHMvZ3JpZC9ncmlkLmxlc3MiLCIuLi8uLi9ub2RlX21vZHVsZXMvY2tzb3VyY2Utc2FtcGxlcy1mcmFtZXdvcmsvbm9kZV9tb2R1bGVzL2xlc3NoYXQvYnVpbGQvbGVzc2hhdC5sZXNzIiwiLi4vLi4vbm9kZV9tb2R1bGVzL2Nrc291cmNlLXNhbXBsZXMtZnJhbWV3b3JrL2NvbXBvbmVudHMvaGVhZGVyLWEvaGVhZGVyLWEubGVzcyIsIi4uLy4uL25vZGVfbW9kdWxlcy9ja3NvdXJjZS1zYW1wbGVzLWZyYW1ld29yay9jb21wb25lbnRzL25hdmlnYXRpb24tYS9uYXZpZ2F0aW9uLWEubGVzcyIsIi4uLy4uL25vZGVfbW9kdWxlcy9ja3NvdXJjZS1zYW1wbGVzLWZyYW1ld29yay9jb21wb25lbnRzL25hdmlnYXRpb24tYi9uYXZpZ2F0aW9uLWIubGVzcyIsIi4uLy4uL25vZGVfbW9kdWxlcy9ja3NvdXJjZS1zYW1wbGVzLWZyYW1ld29yay9jb21wb25lbnRzL2Zvb3Rlci1hL2Zvb3Rlci1hLmxlc3MiLCIuLi8uLi9ub2RlX21vZHVsZXMvY2tzb3VyY2Utc2FtcGxlcy1mcmFtZXdvcmsvY29tcG9uZW50cy9jb250ZW50L2NvbnRlbnQubGVzcyIsIi4uLy4uL25vZGVfbW9kdWxlcy9ja3NvdXJjZS1zYW1wbGVzLWZyYW1ld29yay9jb21wb25lbnRzL2J1dHRvbi1hL2J1dHRvbi1hLmxlc3MiLCIuLi8uLi9ub2RlX21vZHVsZXMvY2tzb3VyY2Utc2FtcGxlcy1mcmFtZXdvcmsvY29tcG9uZW50cy9iYWxsb29uLWEvYmFsbG9vbi1hLmxlc3MiLCIuLi8uLi9ub2RlX21vZHVsZXMvY2tzb3VyY2Utc2FtcGxlcy1mcmFtZXdvcmsvY29tcG9uZW50cy9pY29uL2ljb24ubGVzcyIsIi4uLy4uL25vZGVfbW9kdWxlcy9ja3NvdXJjZS1zYW1wbGVzLWZyYW1ld29yay9jb21wb25lbnRzL3N3aXRjaC9zd2l0Y2gubGVzcyIsIi4uLy4uL25vZGVfbW9kdWxlcy9ja3NvdXJjZS1zYW1wbGVzLWZyYW1ld29yay9jb21wb25lbnRzL3RvZ2dsZXIvdG9nZ2xlci5sZXNzIiwiLi4vLi4vbm9kZV9tb2R1bGVzL2Nrc291cmNlLXNhbXBsZXMtZnJhbWV3b3JrL2NvbXBvbmVudHMvbW9kYWwvbW9kYWwubGVzcyIsIi4uLy4uL25vZGVfbW9kdWxlcy9ja3NvdXJjZS1zYW1wbGVzLWZyYW1ld29yay9jb21wb25lbnRzL2Jhc2ljc2FtcGxlL2NvcmUubGVzcyIsIi4uLy4uL25vZGVfbW9kdWxlcy9ja3NvdXJjZS1zYW1wbGVzLWZyYW1ld29yay9jb21wb25lbnRzL2Jhc2ljc2FtcGxlL2Fkam9pbmVkLmxlc3MiLCIuLi8uLi9zYW1wbGVzL2xlc3MvY3VzdG9tLmxlc3MiLCIuLi8uLi9zYW1wbGVzL3Rvb2xiYXJjb25maWd1cmF0b3IvbGVzcy90b29sYmFybW9kaWZpZXIubGVzcyIsIi4uLy4uL3NhbXBsZXMvdG9vbGJhcmNvbmZpZ3VyYXRvci9sZXNzL2Jhc2UubGVzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBc0RBLFFBSGlDO0VBeUNoQztJQUNDLHdCQUFBOzs7QUMxRkY7QUFBUztBQUFPO0FBQVM7QUFBWTtBQUFRO0FBQVE7QUFBUTtBQUFRO0FBQU07QUFBTTtBQUFLO0VBQ3JGLGNBQUE7O0FBR0Q7QUFBTTtFQUNMLFNBQUE7RUFDQSxVQUFBO0VBQ0Esd0JETitCLHVDQ00vQjtFQUNBLGdCQUFBO0VBQ0EsY0FBQTs7QUNIQSxZQUFZO0VBQ1gsVUFBQTs7QUFERCxZQUFZO0VBQ1gsVUFBQTs7QUFERCxZ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 */
diff --git a/release/samples/img/github-top.png b/release/samples/img/github-top.png
new file mode 100644
index 0000000..7b9cbb1
--- /dev/null
+++ b/release/samples/img/github-top.png
Binary files differ
diff --git a/release/samples/img/header-bg.png b/release/samples/img/header-bg.png
new file mode 100644
index 0000000..a14166a
--- /dev/null
+++ b/release/samples/img/header-bg.png
Binary files differ
diff --git a/release/samples/img/header-separator.png b/release/samples/img/header-separator.png
new file mode 100644
index 0000000..8c4fb9b
--- /dev/null
+++ b/release/samples/img/header-separator.png
Binary files differ
diff --git a/release/samples/img/logo.png b/release/samples/img/logo.png
new file mode 100644
index 0000000..96d86e2
--- /dev/null
+++ b/release/samples/img/logo.png
Binary files differ
diff --git a/release/samples/img/navigation-tip.png b/release/samples/img/navigation-tip.png
new file mode 100644
index 0000000..2286114
--- /dev/null
+++ b/release/samples/img/navigation-tip.png
Binary files differ
diff --git a/release/samples/index.html b/release/samples/index.html
new file mode 100644
index 0000000..3fe8960
--- /dev/null
+++ b/release/samples/index.html
@@ -0,0 +1,128 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>CKEditor Sample</title>
10 <script src="../ckeditor.js"></script>
11 <script src="js/sample.js"></script>
12 <link rel="stylesheet" href="css/samples.css">
13 <link rel="stylesheet" href="toolbarconfigurator/lib/codemirror/neo.css">
14</head>
15<body id="main">
16
17<nav class="navigation-a">
18 <div class="grid-container">
19 <ul class="navigation-a-left grid-width-70">
20 <li><a href="http://ckeditor.com">Project Homepage</a></li>
21 <li><a href="http://dev.ckeditor.com/">I found a bug</a></li>
22 <li><a href="http://github.com/ckeditor/ckeditor-dev" class="icon-pos-right icon-navigation-a-github">Fork CKEditor on GitHub</a></li>
23 </ul>
24 <ul class="navigation-a-right grid-width-30">
25 <li><a href="http://ckeditor.com/blog-list">CKEditor Blog</a></li>
26 </ul>
27 </div>
28</nav>
29
30<header class="header-a">
31 <div class="grid-container">
32 <h1 class="header-a-logo grid-width-30">
33 <a href="index.html"><img src="img/logo.png" alt="CKEditor Sample"></a>
34 </h1>
35
36 <nav class="navigation-b grid-width-70">
37 <ul>
38 <li><a href="index.html" class="button-a button-a-background">Start</a></li>
39 <li><a href="toolbarconfigurator/index.html" class="button-a">Toolbar configurator <span class="balloon-a balloon-a-nw">Edit your toolbar now!</span></a></li>
40 </ul>
41 </nav>
42 </div>
43</header>
44
45<main>
46 <div class="adjoined-top">
47 <div class="grid-container">
48 <div class="content grid-width-100">
49 <h1>Congratulations!</h1>
50 <p>
51 If you can see CKEditor below, it means that the installation succeeded.
52 You can now try out your new editor version, see its features, and when you are ready to move on, check some of the <a href="#sample-customize">most useful resources</a> recommended below.
53 </p>
54 </div>
55 </div>
56 </div>
57 <div class="adjoined-bottom">
58 <div class="grid-container">
59 <div class="grid-width-100">
60 <div id="editor">
61 <h1>Hello world!</h1>
62 <p>I'm an instance of <a href="http://ckeditor.com">CKEditor</a>.</p>
63 </div>
64 </div>
65 </div>
66 </div>
67
68 <div class="grid-container">
69 <div class="content grid-width-100">
70 <section id="sample-customize">
71 <h2>Customize Your Editor</h2>
72 <p>Modular build and <a href="http://docs.ckeditor.com/#!/guide/dev_configuration">numerous configuration options</a> give you nearly endless possibilities to customize CKEditor. Replace the content of your <code><a href="../config.js">config.js</a></code> file with the following code and refresh this page (<strong>remember to clear the browser cache</strong>)!</p>
73 <pre class="cm-s-neo CodeMirror"><code><span style="padding-right: 0.1px;"><span class="cm-variable">CKEDITOR</span>.<span class="cm-property">editorConfig</span> <span class="cm-operator">=</span> <span class="cm-keyword">function</span>( <span class="cm-def">config</span> ) {</span>
74<span style="padding-right: 0.1px;"><span class="cm-tab"> </span><span class="cm-variable-2">config</span>.<span class="cm-property">language</span> <span class="cm-operator">=</span> <span class="cm-string">'es'</span>;</span>
75<span style="padding-right: 0.1px;"><span class="cm-tab"> </span><span class="cm-variable-2">config</span>.<span class="cm-property">uiColor</span> <span class="cm-operator">=</span> <span class="cm-string">'#F7B42C'</span>;</span>
76<span style="padding-right: 0.1px;"><span class="cm-tab"> </span><span class="cm-variable-2">config</span>.<span class="cm-property">height</span> <span class="cm-operator">=</span> <span class="cm-number">300</span>;</span>
77<span style="padding-right: 0.1px;"><span class="cm-tab"> </span><span class="cm-variable-2">config</span>.<span class="cm-property">toolbarCanCollapse</span> <span class="cm-operator">=</span> <span class="cm-atom">true</span>;</span>
78<span style="padding-right: 0.1px;">};</span></code></pre>
79 </section>
80
81 <section>
82 <h2>Toolbar Configuration</h2>
83 <p>If you want to reorder toolbar buttons or remove some of them, check <a href="toolbarconfigurator/index.html">this handy tool</a>!</p>
84 </section>
85
86 <section>
87 <h2>More Samples!</h2>
88 <p>Visit the <a href="http://sdk.ckeditor.com">CKEditor SDK</a> for a huge collection of samples showcasing editor features, with source code readily available to copy and use in your own implementation.</p>
89 </section>
90
91 <section>
92 <h2>Developer's Guide</h2>
93 <p>The most important resource for all developers working with CKEditor, integrating it with their websites and applications, and customizing to their needs. You can start from here:</p>
94 <ul>
95 <li><a href="http://docs.ckeditor.com/#!/guide/dev_installation">Getting Started</a> &ndash; Explains most crucial editor concepts and practices as well as the installation process and integration with your website.</li>
96 <li><a href="http://docs.ckeditor.com/#!/guide/dev_advanced_installation">Advanced Installation Concepts</a> &ndash; Describes how to upgrade, install additional components (plugins, skins), or create a custom build.</li>
97 </ul>
98 <p>When you have the basics sorted out, feel free to browse some more advanced sections like:</p>
99 <ul>
100 <li><a href="http://docs.ckeditor.com/#!/guide/dev_features">Functionality Overview</a> &ndash; Descriptions and samples of various editor features.</li>
101 <li><a href="http://docs.ckeditor.com/#!/guide/plugin_sdk_intro">Plugin SDK</a>, <a href="http://docs.ckeditor.com/#!/guide/widget_sdk_intro">Widget SDK</a>, and <a href="http://docs.ckeditor.com/#!/guide/skin_sdk_intro">Skin SDK</a> &ndash; Useful when you want to create your own editor components.</li>
102 </ul>
103 </section>
104
105 <section>
106 <h2>CKEditor JavaScript API</h2>
107 <p>CKEditor boasts a rich <a href="http://docs.ckeditor.com/#!/api">JavaScript API</a> that you can use to adjust the editor to your needs and integrate it with your website or application.</p>
108 </section>
109 </div>
110 </div>
111</main>
112
113<footer class="footer-a grid-container">
114 <div class="grid-container">
115 <p class="grid-width-100">
116 CKEditor &ndash; The text editor for the Internet &ndash; <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
117 </p>
118 <p class="grid-width-100" id="copy">
119 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> &ndash; Frederico Knabben. All rights reserved.
120 </p>
121 </div>
122</footer>
123<script>
124 initSample();
125</script>
126
127</body>
128</html>
diff --git a/release/samples/js/sample.js b/release/samples/js/sample.js
new file mode 100644
index 0000000..f0cd939
--- /dev/null
+++ b/release/samples/js/sample.js
@@ -0,0 +1,53 @@
1/**
2 * Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license
4 */
5
6/* exported initSample */
7
8if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
9 CKEDITOR.tools.enableHtml5Elements( document );
10
11// The trick to keep the editor in the sample quite small
12// unless user specified own height.
13CKEDITOR.config.height = 150;
14CKEDITOR.config.width = 'auto';
15
16var initSample = ( function() {
17 var wysiwygareaAvailable = isWysiwygareaAvailable(),
18 isBBCodeBuiltIn = !!CKEDITOR.plugins.get( 'bbcode' );
19
20 return function() {
21 var editorElement = CKEDITOR.document.getById( 'editor' );
22
23 // :(((
24 if ( isBBCodeBuiltIn ) {
25 editorElement.setHtml(
26 'Hello world!\n\n' +
27 'I\'m an instance of [url=http://ckeditor.com]CKEditor[/url].'
28 );
29 }
30
31 // Depending on the wysiwygare plugin availability initialize classic or inline editor.
32 if ( wysiwygareaAvailable ) {
33 CKEDITOR.replace( 'editor' );
34 } else {
35 editorElement.setAttribute( 'contenteditable', 'true' );
36 CKEDITOR.inline( 'editor' );
37
38 // TODO we can consider displaying some info box that
39 // without wysiwygarea the classic editor may not work.
40 }
41 };
42
43 function isWysiwygareaAvailable() {
44 // If in development mode, then the wysiwygarea must be available.
45 // Split REV into two strings so builder does not replace it :D.
46 if ( CKEDITOR.revision == ( '%RE' + 'V%' ) ) {
47 return true;
48 }
49
50 return !!CKEDITOR.plugins.get( 'wysiwygarea' );
51 }
52} )();
53
diff --git a/release/samples/js/sf.js b/release/samples/js/sf.js
new file mode 100644
index 0000000..69dd77d
--- /dev/null
+++ b/release/samples/js/sf.js
@@ -0,0 +1,17 @@
1/*
2 Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3 For licensing, see LICENSE.md or http://ckeditor.com/license
4*/
5var SF=function(){function d(a){return(a=a.attributes?a.attributes.getNamedItem("class"):null)?a.value.split(" "):[]}function c(a){var e=document.createAttribute("class");e.value=a.join(" ");return e}var b={attachListener:function(a,e,b){if(a.addEventListener)a.addEventListener(e,b,!1);else if(a.attachEvent)a.attachEvent("on"+e,function(){b.apply(a,arguments)});else throw Error("Could not attach event.");}};b.indexOf=function(){var a=Array.prototype.indexOf;return"function"===a?function(e,b){return a.call(e,
6b)}:function(a,b){for(var c=a.length,d=0;d<c;d++)if(a[d]===b)return d;return-1}}();b.accept=function(a,e){var c;a.children?(c=a.children,e(a)):"number"===typeof a.length&&(c=a);for(var d=c?c.length||0:0;d--;)b.accept(c[d],e)};b.getByClass=function(){var a=document.getElementsByClassName;return"function"===typeof a?function(e,b){"string"===typeof e&&(b=e,e=document);return a.call(e,b)}:function(a,c){"string"===typeof a&&(c=a,a=document.getElementsByTagName("html")[0]);var d=[];b.accept(a,function(a){b.classList.contains(a,
7c)&&d.push(a)});return d}}();b.classList={};b.classList.add=function(a,b){var f=d(a);f.push(b);a.attributes.setNamedItem(c(f))};b.classList.remove=function(a,e){var f=d(a,e),n=b.indexOf(f,e);-1!==n&&(f.splice(n,1),a.attributes.setNamedItem(c(f)))};b.classList.contains=function(a,c){return-1!==b.indexOf(d(a),c)};b.classList.toggle=function(a,b){this.contains(a,b)?this.remove(a,b):this.add(a,b)};return b}();"use strict";
8(function(){function d(c){for(var b in c)delete c[b]}SF.modal=function(c){function b(a){27==a.keyCode&&f.close()}c.modalClass="modal content";c.closeClass="modal-close";c.modalStyles=d;c.closeStyles=d;var a=c.afterCreate,e=c.afterClose;c.afterCreate=function(c){a&&a(c);window.addEventListener("keydown",b)};c.afterClose=function(a){e&&e(a);window.removeEventListener("keydown",b)};var f=(new picoModal(c)).afterCreate(c.afterCreate).afterClose(c.afterClose);return f}})();"use strict";
9(function(){for(var d=SF.getByClass("toggler"),c=d.length;c--;)SF.attachListener(d[c],"click",function(){var b=SF.classList.contains(this,"icon-toggler-expanded")||SF.classList.contains(this,"icon-toggler-collapsed"),a=document.getElementById(this.getAttribute("data-for"));SF.classList.toggle(this,"collapsed");SF.classList.contains(this,"collapsed")?(SF.classList.add(a,"collapsed"),b&&(SF.classList.remove(this,"icon-toggler-expanded"),SF.classList.add(this,"icon-toggler-collapsed"))):(SF.classList.remove(a,
10"collapsed"),b&&(SF.classList.remove(this,"icon-toggler-collapsed"),SF.classList.add(this,"icon-toggler-expanded")))})})();"use strict";(function(){for(var d=SF.getByClass("tree-a"),c=d.length;c--;)SF.attachListener(d[c],"click",function(b){b=b.target||b.srcElement;"H2"!==b.nodeName||SF.classList.contains(b,"tree-a-no-sub")||SF.classList.toggle(b,"tree-a-active")})})();
11(function(d,c){function b(a){return"object"===typeof Node?a instanceof Node:a&&"object"===typeof a&&"number"===typeof a.nodeType}function a(){var a=[];return{watch:a.push.bind(a),trigger:function(b){for(var c=!0,d={preventDefault:function(){c=!1}},e=0;e<a.length;e++)a[e](b,d);return c}}}function e(a){this.elem=a}function f(a,b){return e.div().clazz("pico-overlay").clazz(a("overlayClass","")).stylize({display:"block",position:"fixed",top:"0px",left:"0px",height:"100%",width:"100%",zIndex:1E4}).stylize(a("overlayStyles",
12{opacity:.5,background:"#000"})).onClick(function(){a("overlayClose",!0)&&b()})}function n(a,b){var c=a("width","auto");"number"===typeof c&&(c=""+c+"px");return e.div().clazz("pico-content").clazz(a("modalClass","")).stylize({display:"block",position:"fixed",zIndex:10001,left:"50%",top:"50px",width:c,"-ms-transform":"translateX(-50%)","-moz-transform":"translateX(-50%)","-webkit-transform":"translateX(-50%)","-o-transform":"translateX(-50%)",transform:"translateX(-50%)"}).stylize(a("modalStyles",
13{backgroundColor:"white",padding:"20px",borderRadius:"5px"})).html(a("content")).attr("role","dialog").onClick(function(a){(new e(a.target)).anyAncestor(function(a){return/\bpico-close\b/.test(a.elem.className)})&&b()})}function p(a){return function(){return a().elem}}function k(c){function e(a,b){var d=c[a];"function"===typeof d&&(d=d(b));return void 0===d?b:d}function k(){l().hide();m().hide();v.trigger(h)}function q(){w.trigger(h)&&k()}function g(a){return function(){a.apply(this,arguments);return h}}
14function r(a){if(!t){var c=n(e,q),b=f(e,q),d;d=e("closeButton",!0)?c.child().html(e("closeHtml","\x26#xD7;")).clazz("pico-close").clazz(e("closeClass")).stylize(e("closeStyles",{borderRadius:"2px",cursor:"pointer",height:"15px",width:"15px",position:"absolute",top:"5px",right:"5px",fontSize:"16px",textAlign:"center",lineHeight:"15px",background:"#CCC"})):void 0;t={modal:c,overlay:b,close:d};x.trigger(h)}return t[a]}if("string"===typeof c||b(c))c={content:c};var x=a(),y=a(),z=a(),w=a(),v=a(),t,m=r.bind(d,
15"modal"),l=r.bind(d,"overlay"),u=r.bind(d,"close"),h={modalElem:p(m),closeElem:p(u),overlayElem:p(l),show:function(){y.trigger(h)&&(l().show(),u(),m().show(),z.trigger(h));return this},close:g(q),forceClose:g(k),destroy:function(){m=m().destroy();l=l().destroy();u=void 0},options:function(a){c=a},afterCreate:g(x.watch),beforeShow:g(y.watch),afterShow:g(z.watch),beforeClose:g(w.watch),afterClose:g(v.watch)};return h}e.div=function(a){var b=c.createElement("div");(a||c.body).appendChild(b);return new e(b)};
16e.prototype={child:function(){return e.div(this.elem)},stylize:function(a){a=a||{};"undefined"!==typeof a.opacity&&(a.filter="alpha(opacity\x3d"+100*a.opacity+")");for(var b in a)a.hasOwnProperty(b)&&(this.elem.style[b]=a[b]);return this},clazz:function(a){this.elem.className+=" "+a;return this},html:function(a){b(a)?this.elem.appendChild(a):this.elem.innerHTML=a;return this},onClick:function(a){this.elem.addEventListener("click",a);return this},destroy:function(){c.body.removeChild(this.elem)},hide:function(){this.elem.style.display=
17"none"},show:function(){this.elem.style.display="block"},attr:function(a,b){this.elem.setAttribute(a,b);return this},anyAncestor:function(a){for(var b=this.elem;b;){if(a(new e(b)))return!0;b=b.parentNode}return!1}};"function"===typeof d.define&&d.define.amd?d.define(function(){return k}):d.picoModal=k})(window,document); \ No newline at end of file
diff --git a/release/samples/old/ajax.html b/release/samples/old/ajax.html
new file mode 100644
index 0000000..3ca07c2
--- /dev/null
+++ b/release/samples/old/ajax.html
@@ -0,0 +1,85 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Ajax &mdash; CKEditor Sample</title>
10 <script src="../../ckeditor.js"></script>
11 <link rel="stylesheet" href="sample.css">
12 <script>
13
14 var editor, html = '';
15
16 function createEditor() {
17 if ( editor )
18 return;
19
20 // Create a new editor inside the <div id="editor">, setting its value to html
21 var config = {};
22 editor = CKEDITOR.appendTo( 'editor', config, html );
23 }
24
25 function removeEditor() {
26 if ( !editor )
27 return;
28
29 // Retrieve the editor contents. In an Ajax application, this data would be
30 // sent to the server or used in any other way.
31 document.getElementById( 'editorcontents' ).innerHTML = html = editor.getData();
32 document.getElementById( 'contents' ).style.display = '';
33
34 // Destroy the editor.
35 editor.destroy();
36 editor = null;
37 }
38
39 </script>
40</head>
41<body>
42 <h1 class="samples">
43 <a href="index.html">CKEditor Samples</a> &raquo; Create and Destroy Editor Instances for Ajax Applications
44 </h1>
45 <div class="warning deprecated">
46 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/saveajax.html">brand new version in CKEditor SDK</a>.
47 </div>
48 <div class="description">
49 <p>
50 This sample shows how to create and destroy CKEditor instances on the fly. After the removal of CKEditor the content created inside the editing
51 area will be displayed in a <code>&lt;div&gt;</code> element.
52 </p>
53 <p>
54 For details of how to create this setup check the source code of this sample page
55 for JavaScript code responsible for the creation and destruction of a CKEditor instance.
56 </p>
57 </div>
58 <p>Click the buttons to create and remove a CKEditor instance.</p>
59 <p>
60 <input onclick="createEditor();" type="button" value="Create Editor">
61 <input onclick="removeEditor();" type="button" value="Remove Editor">
62 </p>
63 <!-- This div will hold the editor. -->
64 <div id="editor">
65 </div>
66 <div id="contents" style="display: none">
67 <p>
68 Edited Contents:
69 </p>
70 <!-- This div will be used to display the editor contents. -->
71 <div id="editorcontents">
72 </div>
73 </div>
74 <div id="footer">
75 <hr>
76 <p>
77 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
78 </p>
79 <p id="copy">
80 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
81 Knabben. All rights reserved.
82 </p>
83 </div>
84</body>
85</html>
diff --git a/release/samples/old/api.html b/release/samples/old/api.html
new file mode 100644
index 0000000..88a4b06
--- /dev/null
+++ b/release/samples/old/api.html
@@ -0,0 +1,210 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>API Usage &mdash; CKEditor Sample</title>
10 <script src="../../ckeditor.js"></script>
11 <link href="sample.css" rel="stylesheet">
12 <script>
13
14// The instanceReady event is fired, when an instance of CKEditor has finished
15// its initialization.
16CKEDITOR.on( 'instanceReady', function( ev ) {
17 // Show the editor name and description in the browser status bar.
18 document.getElementById( 'eMessage' ).innerHTML = 'Instance <code>' + ev.editor.name + '<\/code> loaded.';
19
20 // Show this sample buttons.
21 document.getElementById( 'eButtons' ).style.display = 'block';
22});
23
24function InsertHTML() {
25 // Get the editor instance that we want to interact with.
26 var editor = CKEDITOR.instances.editor1;
27 var value = document.getElementById( 'htmlArea' ).value;
28
29 // Check the active editing mode.
30 if ( editor.mode == 'wysiwyg' )
31 {
32 // Insert HTML code.
33 // http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertHtml
34 editor.insertHtml( value );
35 }
36 else
37 alert( 'You must be in WYSIWYG mode!' );
38}
39
40function InsertText() {
41 // Get the editor instance that we want to interact with.
42 var editor = CKEDITOR.instances.editor1;
43 var value = document.getElementById( 'txtArea' ).value;
44
45 // Check the active editing mode.
46 if ( editor.mode == 'wysiwyg' )
47 {
48 // Insert as plain text.
49 // http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertText
50 editor.insertText( value );
51 }
52 else
53 alert( 'You must be in WYSIWYG mode!' );
54}
55
56function SetContents() {
57 // Get the editor instance that we want to interact with.
58 var editor = CKEDITOR.instances.editor1;
59 var value = document.getElementById( 'htmlArea' ).value;
60
61 // Set editor contents (replace current contents).
62 // http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setData
63 editor.setData( value );
64}
65
66function GetContents() {
67 // Get the editor instance that you want to interact with.
68 var editor = CKEDITOR.instances.editor1;
69
70 // Get editor contents
71 // http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getData
72 alert( editor.getData() );
73}
74
75function ExecuteCommand( commandName ) {
76 // Get the editor instance that we want to interact with.
77 var editor = CKEDITOR.instances.editor1;
78
79 // Check the active editing mode.
80 if ( editor.mode == 'wysiwyg' )
81 {
82 // Execute the command.
83 // http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-execCommand
84 editor.execCommand( commandName );
85 }
86 else
87 alert( 'You must be in WYSIWYG mode!' );
88}
89
90function CheckDirty() {
91 // Get the editor instance that we want to interact with.
92 var editor = CKEDITOR.instances.editor1;
93 // Checks whether the current editor contents present changes when compared
94 // to the contents loaded into the editor at startup
95 // http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-checkDirty
96 alert( editor.checkDirty() );
97}
98
99function ResetDirty() {
100 // Get the editor instance that we want to interact with.
101 var editor = CKEDITOR.instances.editor1;
102 // Resets the "dirty state" of the editor (see CheckDirty())
103 // http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-resetDirty
104 editor.resetDirty();
105 alert( 'The "IsDirty" status has been reset' );
106}
107
108function Focus() {
109 CKEDITOR.instances.editor1.focus();
110}
111
112function onFocus() {
113 document.getElementById( 'eMessage' ).innerHTML = '<b>' + this.name + ' is focused </b>';
114}
115
116function onBlur() {
117 document.getElementById( 'eMessage' ).innerHTML = this.name + ' lost focus';
118}
119
120 </script>
121
122</head>
123<body>
124 <h1 class="samples">
125 <a href="index.html">CKEditor Samples</a> &raquo; Using CKEditor JavaScript API
126 </h1>
127 <div class="warning deprecated">
128 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/api.html">brand new version in CKEditor SDK</a>.
129 </div>
130 <div class="description">
131 <p>
132 This sample shows how to use the
133 <a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.editor">CKEditor JavaScript API</a>
134 to interact with the editor at runtime.
135 </p>
136 <p>
137 For details on how to create this setup check the source code of this sample page.
138 </p>
139 </div>
140
141 <!-- This <div> holds alert messages to be display in the sample page. -->
142 <div id="alerts">
143 <noscript>
144 <p>
145 <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
146 support, like yours, you should still see the contents (HTML data) and you should
147 be able to edit it normally, without a rich editor interface.
148 </p>
149 </noscript>
150 </div>
151 <form action="../../../samples/sample_posteddata.php" method="post">
152 <textarea cols="100" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
153
154 <script>
155 // Replace the <textarea id="editor1"> with an CKEditor instance.
156 CKEDITOR.replace( 'editor1', {
157 on: {
158 focus: onFocus,
159 blur: onBlur,
160
161 // Check for availability of corresponding plugins.
162 pluginsLoaded: function( evt ) {
163 var doc = CKEDITOR.document, ed = evt.editor;
164 if ( !ed.getCommand( 'bold' ) )
165 doc.getById( 'exec-bold' ).hide();
166 if ( !ed.getCommand( 'link' ) )
167 doc.getById( 'exec-link' ).hide();
168 }
169 }
170 });
171 </script>
172
173 <p id="eMessage">
174 </p>
175
176 <div id="eButtons" style="display: none">
177 <input id="exec-bold" onclick="ExecuteCommand('bold');" type="button" value="Execute &quot;bold&quot; Command">
178 <input id="exec-link" onclick="ExecuteCommand('link');" type="button" value="Execute &quot;link&quot; Command">
179 <input onclick="Focus();" type="button" value="Focus">
180 <br><br>
181 <input onclick="InsertHTML();" type="button" value="Insert HTML">
182 <input onclick="SetContents();" type="button" value="Set Editor Contents">
183 <input onclick="GetContents();" type="button" value="Get Editor Contents (HTML)">
184 <br>
185 <textarea cols="100" id="htmlArea" rows="3">&lt;h2&gt;Test&lt;/h2&gt;&lt;p&gt;This is some &lt;a href="/Test1.html"&gt;sample&lt;/a&gt; HTML code.&lt;/p&gt;</textarea>
186 <br>
187 <br>
188 <input onclick="InsertText();" type="button" value="Insert Text">
189 <br>
190 <textarea cols="100" id="txtArea" rows="3"> First line with some leading whitespaces.
191
192Second line of text preceded by two line breaks.</textarea>
193 <br>
194 <br>
195 <input onclick="CheckDirty();" type="button" value="checkDirty()">
196 <input onclick="ResetDirty();" type="button" value="resetDirty()">
197 </div>
198 </form>
199 <div id="footer">
200 <hr>
201 <p>
202 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
203 </p>
204 <p id="copy">
205 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
206 Knabben. All rights reserved.
207 </p>
208 </div>
209</body>
210</html>
diff --git a/release/samples/old/appendto.html b/release/samples/old/appendto.html
new file mode 100644
index 0000000..dbabf75
--- /dev/null
+++ b/release/samples/old/appendto.html
@@ -0,0 +1,59 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Append To Page Element Using JavaScript Code &mdash; CKEditor Sample</title>
10 <script src="../../ckeditor.js"></script>
11 <link rel="stylesheet" href="sample.css">
12</head>
13<body>
14 <h1 class="samples">
15 <a href="index.html">CKEditor Samples</a> &raquo; Append To Page Element Using JavaScript Code
16 </h1>
17 <div class="warning deprecated">
18 This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
19 </div>
20 <div id="section1">
21 <div class="description">
22 <p>
23 The <code><a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR-method-appendTo">CKEDITOR.appendTo()</a></code> method serves to to place editors inside existing DOM elements. Unlike <code><a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR-method-replace">CKEDITOR.replace()</a></code>,
24 a target container to be replaced is no longer necessary. A new editor
25 instance is inserted directly wherever it is desired.
26 </p>
27<pre class="samples">CKEDITOR.appendTo( '<em>container_id</em>',
28 { /* Configuration options to be used. */ }
29 'Editor content to be used.'
30);</pre>
31 </div>
32 <script>
33
34 // This call can be placed at any point after the
35 // DOM element to append CKEditor to or inside the <head><script>
36 // in a window.onload event handler.
37
38 // Append a CKEditor instance using the default configuration and the
39 // provided content to the <div> element of ID "section1".
40 CKEDITOR.appendTo( 'section1',
41 null,
42 '<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>'
43 );
44
45 </script>
46 </div>
47 <br>
48 <div id="footer">
49 <hr>
50 <p>
51 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
52 </p>
53 <p id="copy">
54 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
55 Knabben. All rights reserved.
56 </p>
57 </div>
58</body>
59</html>
diff --git a/release/samples/old/assets/inlineall/logo.png b/release/samples/old/assets/inlineall/logo.png
new file mode 100644
index 0000000..b4d5979
--- /dev/null
+++ b/release/samples/old/assets/inlineall/logo.png
Binary files differ
diff --git a/release/samples/old/assets/outputxhtml/outputxhtml.css b/release/samples/old/assets/outputxhtml/outputxhtml.css
new file mode 100644
index 0000000..fbcc767
--- /dev/null
+++ b/release/samples/old/assets/outputxhtml/outputxhtml.css
@@ -0,0 +1,204 @@
1/*
2 * Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license
4 *
5 * Styles used by the XHTML 1.1 sample page (xhtml.html).
6 */
7
8/**
9 * Basic definitions for the editing area.
10 */
11body
12{
13 font-family: Arial, Verdana, sans-serif;
14 font-size: 80%;
15 color: #000000;
16 background-color: #ffffff;
17 padding: 5px;
18 margin: 0px;
19}
20
21/**
22 * Core styles.
23 */
24
25.Bold
26{
27 font-weight: bold;
28}
29
30.Italic
31{
32 font-style: italic;
33}
34
35.Underline
36{
37 text-decoration: underline;
38}
39
40.StrikeThrough
41{
42 text-decoration: line-through;
43}
44
45.Subscript
46{
47 vertical-align: sub;
48 font-size: smaller;
49}
50
51.Superscript
52{
53 vertical-align: super;
54 font-size: smaller;
55}
56
57/**
58 * Font faces.
59 */
60
61.FontComic
62{
63 font-family: 'Comic Sans MS';
64}
65
66.FontCourier
67{
68 font-family: 'Courier New';
69}
70
71.FontTimes
72{
73 font-family: 'Times New Roman';
74}
75
76/**
77 * Font sizes.
78 */
79
80.FontSmaller
81{
82 font-size: smaller;
83}
84
85.FontLarger
86{
87 font-size: larger;
88}
89
90.FontSmall
91{
92 font-size: 8pt;
93}
94
95.FontBig
96{
97 font-size: 14pt;
98}
99
100.FontDouble
101{
102 font-size: 200%;
103}
104
105/**
106 * Font colors.
107 */
108.FontColor1
109{
110 color: #ff9900;
111}
112
113.FontColor2
114{
115 color: #0066cc;
116}
117
118.FontColor3
119{
120 color: #ff0000;
121}
122
123.FontColor1BG
124{
125 background-color: #ff9900;
126}
127
128.FontColor2BG
129{
130 background-color: #0066cc;
131}
132
133.FontColor3BG
134{
135 background-color: #ff0000;
136}
137
138/**
139 * Indentation.
140 */
141
142.Indent1
143{
144 margin-left: 40px;
145}
146
147.Indent2
148{
149 margin-left: 80px;
150}
151
152.Indent3
153{
154 margin-left: 120px;
155}
156
157/**
158 * Alignment.
159 */
160
161.JustifyLeft
162{
163 text-align: left;
164}
165
166.JustifyRight
167{
168 text-align: right;
169}
170
171.JustifyCenter
172{
173 text-align: center;
174}
175
176.JustifyFull
177{
178 text-align: justify;
179}
180
181/**
182 * Other.
183 */
184
185code
186{
187 font-family: courier, monospace;
188 background-color: #eeeeee;
189 padding-left: 1px;
190 padding-right: 1px;
191 border: #c0c0c0 1px solid;
192}
193
194kbd
195{
196 padding: 0px 1px 0px 1px;
197 border-width: 1px 2px 2px 1px;
198 border-style: solid;
199}
200
201blockquote
202{
203 color: #808080;
204}
diff --git a/release/samples/old/assets/posteddata.php b/release/samples/old/assets/posteddata.php
new file mode 100644
index 0000000..bb4dd94
--- /dev/null
+++ b/release/samples/old/assets/posteddata.php
@@ -0,0 +1,59 @@
1<!DOCTYPE html>
2<?php
3/*
4Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
5For licensing, see LICENSE.md or http://ckeditor.com/license
6*/
7?>
8<html>
9<head>
10 <meta charset="utf-8">
11 <title>Sample &mdash; CKEditor</title>
12 <link rel="stylesheet" href="sample.css">
13</head>
14<body>
15 <h1 class="samples">
16 CKEditor &mdash; Posted Data
17 </h1>
18 <table border="1" cellspacing="0" id="outputSample">
19 <colgroup><col width="120"></colgroup>
20 <thead>
21 <tr>
22 <th>Field&nbsp;Name</th>
23 <th>Value</th>
24 </tr>
25 </thead>
26<?php
27
28if (!empty($_POST))
29{
30 foreach ( $_POST as $key => $value )
31 {
32 if ( ( !is_string($value) && !is_numeric($value) ) || !is_string($key) )
33 continue;
34
35 if ( get_magic_quotes_gpc() )
36 $value = htmlspecialchars( stripslashes((string)$value) );
37 else
38 $value = htmlspecialchars( (string)$value );
39?>
40 <tr>
41 <th style="vertical-align: top"><?php echo htmlspecialchars( (string)$key ); ?></th>
42 <td><pre class="samples"><?php echo $value; ?></pre></td>
43 </tr>
44 <?php
45 }
46}
47?>
48 </table>
49 <div id="footer">
50 <hr>
51 <p>
52 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
53 </p>
54 <p id="copy">
55 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
56 </p>
57 </div>
58</body>
59</html>
diff --git a/release/samples/old/assets/sample.jpg b/release/samples/old/assets/sample.jpg
new file mode 100644
index 0000000..9498271
--- /dev/null
+++ b/release/samples/old/assets/sample.jpg
Binary files differ
diff --git a/release/samples/old/assets/uilanguages/languages.js b/release/samples/old/assets/uilanguages/languages.js
new file mode 100644
index 0000000..df904e1
--- /dev/null
+++ b/release/samples/old/assets/uilanguages/languages.js
@@ -0,0 +1,7 @@
1/*
2 Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3 For licensing, see LICENSE.md or http://ckeditor.com/license
4*/
5var CKEDITOR_LANGS=function(){var c={af:"Afrikaans",ar:"Arabic",az:"Azerbaijani",bg:"Bulgarian",bn:"Bengali/Bangla",bs:"Bosnian",ca:"Catalan",cs:"Czech",cy:"Welsh",da:"Danish",de:"German","de-ch":"German (Switzerland)",el:"Greek",en:"English","en-au":"English (Australia)","en-ca":"English (Canadian)","en-gb":"English (United Kingdom)",eo:"Esperanto",es:"Spanish",et:"Estonian",eu:"Basque",fa:"Persian",fi:"Finnish",fo:"Faroese",fr:"French","fr-ca":"French (Canada)",gl:"Galician",gu:"Gujarati",he:"Hebrew",
6hi:"Hindi",hr:"Croatian",hu:"Hungarian",id:"Indonesian",is:"Icelandic",it:"Italian",ja:"Japanese",ka:"Georgian",km:"Khmer",ko:"Korean",ku:"Kurdish",lt:"Lithuanian",lv:"Latvian",mk:"Macedonian",mn:"Mongolian",ms:"Malay",nb:"Norwegian Bokmal",nl:"Dutch",no:"Norwegian",oc:"Occitan",pl:"Polish",pt:"Portuguese (Portugal)","pt-br":"Portuguese (Brazil)",ro:"Romanian",ru:"Russian",si:"Sinhala",sk:"Slovak",sq:"Albanian",sl:"Slovenian",sr:"Serbian (Cyrillic)","sr-latn":"Serbian (Latin)",sv:"Swedish",th:"Thai",
7tr:"Turkish",tt:"Tatar",ug:"Uighur",uk:"Ukrainian",vi:"Vietnamese",zh:"Chinese Traditional","zh-cn":"Chinese Simplified"},b=[],a;for(a in CKEDITOR.lang.languages)b.push({code:a,name:c[a]||a});b.sort(function(a,b){return a.name<b.name?-1:1});return b}(); \ No newline at end of file
diff --git a/release/samples/old/datafiltering.html b/release/samples/old/datafiltering.html
new file mode 100644
index 0000000..637c17b
--- /dev/null
+++ b/release/samples/old/datafiltering.html
@@ -0,0 +1,508 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Data Filtering &mdash; CKEditor Sample</title>
10 <script src="../../ckeditor.js"></script>
11 <link rel="stylesheet" href="sample.css">
12 <script>
13 // Remove advanced tabs for all editors.
14 CKEDITOR.config.removeDialogTabs = 'image:advanced;link:advanced;flash:advanced;creatediv:advanced;editdiv:advanced';
15 </script>
16</head>
17<body>
18 <h1 class="samples">
19 <a href="index.html">CKEditor Samples</a> &raquo; Data Filtering and Features Activation
20 </h1>
21 <div class="warning deprecated">
22 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/acf.html">brand new version in CKEditor SDK</a>.
23 </div>
24 <div class="description">
25 <p>
26 This sample page demonstrates the idea of Advanced Content Filter
27 (<abbr title="Advanced Content Filter">ACF</abbr>), a sophisticated
28 tool that takes control over what kind of data is accepted by the editor and what
29 kind of output is produced.
30 </p>
31 <h2>When and what is being filtered?</h2>
32 <p>
33 <abbr title="Advanced Content Filter">ACF</abbr> controls
34 <strong>every single source of data</strong> that comes to the editor.
35 It process both HTML that is inserted manually (i.e. pasted by the user)
36 and programmatically like:
37 </p>
38<pre class="samples">
39editor.setData( '&lt;p&gt;Hello world!&lt;/p&gt;' );
40</pre>
41 <p>
42 <abbr title="Advanced Content Filter">ACF</abbr> discards invalid,
43 useless HTML tags and attributes so the editor remains "clean" during
44 runtime. <abbr title="Advanced Content Filter">ACF</abbr> behaviour
45 can be configured and adjusted for a particular case to prevent the
46 output HTML (i.e. in CMS systems) from being polluted.
47
48 This kind of filtering is a first, client-side line of defense
49 against "<a href="http://en.wikipedia.org/wiki/Tag_soup">tag soups</a>",
50 the tool that precisely restricts which tags, attributes and styles
51 are allowed (desired). When properly configured, <abbr title="Advanced Content Filter">ACF</abbr>
52 is an easy and fast way to produce a high-quality, intentionally filtered HTML.
53 </p>
54
55 <h3>How to configure or disable ACF?</h3>
56 <p>
57 Advanced Content Filter is enabled by default, working in "automatic mode", yet
58 it provides a set of easy rules that allow adjusting filtering rules
59 and disabling the entire feature when necessary. The config property
60 responsible for this feature is <code><a class="samples"
61 href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">config.allowedContent</a></code>.
62 </p>
63 <p>
64 By "automatic mode" is meant that loaded plugins decide which kind
65 of content is enabled and which is not. For example, if the link
66 plugin is loaded it implies that <code>&lt;a&gt;</code> tag is
67 automatically allowed. Each plugin is given a set
68 of predefined <abbr title="Advanced Content Filter">ACF</abbr> rules
69 that control the editor until <code><a class="samples"
70 href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">
71 config.allowedContent</a></code>
72 is defined manually.
73 </p>
74 <p>
75 Let's assume our intention is to restrict the editor to accept (produce) <strong>paragraphs
76 only: no attributes, no styles, no other tags</strong>.
77 With <abbr title="Advanced Content Filter">ACF</abbr>
78 this is very simple. Basically set <code><a class="samples"
79 href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">
80 config.allowedContent</a></code> to <code>'p'</code>:
81 </p>
82<pre class="samples">
83var editor = CKEDITOR.replace( <em>textarea_id</em>, {
84 <strong>allowedContent: 'p'</strong>
85} );
86</pre>
87 <p>
88 Now try to play with allowed content:
89 </p>
90<pre class="samples">
91// Trying to insert disallowed tag and attribute.
92editor.setData( '&lt;p <strong>style="color: red"</strong>&gt;Hello <strong>&lt;em&gt;world&lt;/em&gt;</strong>!&lt;/p&gt;' );
93alert( editor.getData() );
94
95// Filtered data is returned.
96"&lt;p&gt;Hello world!&lt;/p&gt;"
97</pre>
98 <p>
99 What happened? Since <code>config.allowedContent: 'p'</code> is set the editor assumes
100 that only plain <code>&lt;p&gt;</code> are accepted. Nothing more. This is why
101 <code>style</code> attribute and <code>&lt;em&gt;</code> tag are gone. The same
102 filtering would happen if we pasted disallowed HTML into this editor.
103 </p>
104 <p>
105 This is just a small sample of what <abbr title="Advanced Content Filter">ACF</abbr>
106 can do. To know more, please refer to the sample section below and
107 <a href="http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter">the official Advanced Content Filter guide</a>.
108 </p>
109 <p>
110 You may, of course, want CKEditor to avoid filtering of any kind.
111 To get rid of <abbr title="Advanced Content Filter">ACF</abbr>,
112 basically set <code><a class="samples"
113 href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">
114 config.allowedContent</a></code> to <code>true</code> like this:
115 </p>
116<pre class="samples">
117CKEDITOR.replace( <em>textarea_id</em>, {
118 <strong>allowedContent: true</strong>
119} );
120</pre>
121
122 <h2>Beyond data flow: Features activation</h2>
123 <p>
124 <abbr title="Advanced Content Filter">ACF</abbr> is far more than
125 <abbr title="Input/Output">I/O</abbr> control: the entire
126 <abbr title="User Interface">UI</abbr> of the editor is adjusted to what
127 filters restrict. For example: if <code>&lt;a&gt;</code> tag is
128 <strong>disallowed</strong>
129 by <abbr title="Advanced Content Filter">ACF</abbr>,
130 then accordingly <code>link</code> command, toolbar button and link dialog
131 are also disabled. Editor is smart: it knows which features must be
132 removed from the interface to match filtering rules.
133 </p>
134 <p>
135 CKEditor can be far more specific. If <code>&lt;a&gt;</code> tag is
136 <strong>allowed</strong> by filtering rules to be used but it is restricted
137 to have only one attribute (<code>href</code>)
138 <code>config.allowedContent = 'a[!href]'</code>, then
139 "Target" tab of the link dialog is automatically disabled as <code>target</code>
140 attribute isn't included in <abbr title="Advanced Content Filter">ACF</abbr> rules
141 for <code>&lt;a&gt;</code>. This behaviour applies to dialog fields, context
142 menus and toolbar buttons.
143 </p>
144
145 <h2>Sample configurations</h2>
146 <p>
147 There are several editor instances below that present different
148 <abbr title="Advanced Content Filter">ACF</abbr> setups. <strong>All of them,
149 except the inline instance, share the same HTML content</strong> to visualize
150 how different filtering rules affect the same input data.
151 </p>
152 </div>
153
154 <div>
155 <label for="editor1">
156 Editor 1:
157 </label>
158 <div class="description">
159 <p>
160 This editor is using default configuration ("automatic mode"). It means that
161 <code><a class="samples"
162 href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">
163 config.allowedContent</a></code> is defined by loaded plugins.
164 Each plugin extends filtering rules to make it's own associated content
165 available for the user.
166 </p>
167 </div>
168 <textarea cols="80" id="editor1" name="editor1" rows="10">
169 &lt;h1&gt;&lt;img alt=&quot;Saturn V carrying Apollo 11&quot; class=&quot;right&quot; src=&quot;assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
170 </textarea>
171
172 <script>
173
174 CKEDITOR.replace( 'editor1' );
175
176 </script>
177 </div>
178
179 <br>
180
181 <div>
182 <label for="editor2">
183 Editor 2:
184 </label>
185 <div class="description">
186 <p>
187 This editor is using a custom configuration for
188 <abbr title="Advanced Content Filter">ACF</abbr>:
189 </p>
190<pre class="samples">
191CKEDITOR.replace( 'editor2', {
192 allowedContent:
193 'h1 h2 h3 p blockquote strong em;' +
194 'a[!href];' +
195 'img(left,right)[!src,alt,width,height];' +
196 'table tr th td caption;' +
197 'span{!font-family};' +'
198 'span{!color};' +
199 'span(!marker);' +
200 'del ins'
201} );
202</pre>
203 <p>
204 The following rules may require additional explanation:
205 </p>
206 <ul>
207 <li>
208 <code>h1 h2 h3 p blockquote strong em</code> - These tags
209 are accepted by the editor. Any tag attributes will be discarded.
210 </li>
211 <li>
212 <code>a[!href]</code> - <code>href</code> attribute is obligatory
213 for <code>&lt;a&gt;</code> tag. Tags without this attribute
214 are disarded. No other attribute will be accepted.
215 </li>
216 <li>
217 <code>img(left,right)[!src,alt,width,height]</code> - <code>src</code>
218 attribute is obligatory for <code>&lt;img&gt;</code> tag.
219 <code>alt</code>, <code>width</code>, <code>height</code>
220 and <code>class</code> attributes are accepted but
221 <code>class</code> must be either <code>class="left"</code>
222 or <code>class="right"</code>
223 </li>
224 <li>
225 <code>table tr th td caption</code> - These tags
226 are accepted by the editor. Any tag attributes will be discarded.
227 </li>
228 <li>
229 <code>span{!font-family}</code>, <code>span{!color}</code>,
230 <code>span(!marker)</code> - <code>&lt;span&gt;</code> tags
231 will be accepted if either <code>font-family</code> or
232 <code>color</code> style is set or <code>class="marker"</code>
233 is present.
234 </li>
235 <li>
236 <code>del ins</code> - These tags
237 are accepted by the editor. Any tag attributes will be discarded.
238 </li>
239 </ul>
240 <p>
241 Please note that <strong><abbr title="User Interface">UI</abbr> of the
242 editor is different</strong>. It's a response to what happened to the filters.
243 Since <code>text-align</code> isn't allowed, the align toolbar is gone.
244 The same thing happened to subscript/superscript, strike, underline
245 (<code>&lt;u&gt;</code>, <code>&lt;sub&gt;</code>, <code>&lt;sup&gt;</code>
246 are disallowed by <code><a class="samples"
247 href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent">
248 config.allowedContent</a></code>) and many other buttons.
249 </p>
250 </div>
251 <textarea cols="80" id="editor2" name="editor2" rows="10">
252 &lt;h1&gt;&lt;img alt=&quot;Saturn V carrying Apollo 11&quot; class=&quot;right&quot; src=&quot;assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
253 </textarea>
254 <script>
255
256 CKEDITOR.replace( 'editor2', {
257 allowedContent:
258 'h1 h2 h3 p blockquote strong em;' +
259 'a[!href];' +
260 'img(left,right)[!src,alt,width,height];' +
261 'table tr th td caption;' +
262 'span{!font-family};' +
263 'span{!color};' +
264 'span(!marker);' +
265 'del ins'
266 } );
267
268 </script>
269 </div>
270
271 <br>
272
273 <div>
274 <label for="editor3">
275 Editor 3:
276 </label>
277 <div class="description">
278 <p>
279 This editor is using a custom configuration for
280 <abbr title="Advanced Content Filter">ACF</abbr>.
281 Note that filters can be configured as an object literal
282 as an alternative to a string-based definition.
283 </p>
284<pre class="samples">
285CKEDITOR.replace( 'editor3', {
286 allowedContent: {
287 'b i ul ol big small': true,
288 'h1 h2 h3 p blockquote li': {
289 styles: 'text-align'
290 },
291 a: { attributes: '!href,target' },
292 img: {
293 attributes: '!src,alt',
294 styles: 'width,height',
295 classes: 'left,right'
296 }
297 }
298} );
299</pre>
300 </div>
301 <textarea cols="80" id="editor3" name="editor3" rows="10">
302 &lt;h1&gt;&lt;img alt=&quot;Saturn V carrying Apollo 11&quot; class=&quot;right&quot; src=&quot;assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
303 </textarea>
304 <script>
305
306 CKEDITOR.replace( 'editor3', {
307 allowedContent: {
308 'b i ul ol big small': true,
309 'h1 h2 h3 p blockquote li': {
310 styles: 'text-align'
311 },
312 a: { attributes: '!href,target' },
313 img: {
314 attributes: '!src,alt',
315 styles: 'width,height',
316 classes: 'left,right'
317 }
318 }
319 } );
320
321 </script>
322 </div>
323
324 <br>
325
326 <div>
327 <label for="editor4">
328 Editor 4:
329 </label>
330 <div class="description">
331 <p>
332 This editor is using a custom set of plugins and buttons.
333 </p>
334<pre class="samples">
335CKEDITOR.replace( 'editor4', {
336 removePlugins: 'bidi,font,forms,flash,horizontalrule,iframe,justify,table,tabletools,smiley',
337 removeButtons: 'Anchor,Underline,Strike,Subscript,Superscript,Image',
338 format_tags: 'p;h1;h2;h3;pre;address'
339} );
340</pre>
341 <p>
342 As you can see, removing plugins and buttons implies filtering.
343 Several tags are not allowed in the editor because there's no
344 plugin/button that is responsible for creating and editing this
345 kind of content (for example: the image is missing because
346 of <code>removeButtons: 'Image'</code>). The conclusion is that
347 <abbr title="Advanced Content Filter">ACF</abbr> works "backwards"
348 as well: <strong>modifying <abbr title="User Interface">UI</abbr>
349 elements is changing allowed content rules</strong>.
350 </p>
351 </div>
352 <textarea cols="80" id="editor4" name="editor4" rows="10">
353 &lt;h1&gt;&lt;img alt=&quot;Saturn V carrying Apollo 11&quot; class=&quot;right&quot; src=&quot;assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
354 </textarea>
355 <script>
356
357 CKEDITOR.replace( 'editor4', {
358 removePlugins: 'bidi,div,font,forms,flash,horizontalrule,iframe,justify,table,tabletools,smiley',
359 removeButtons: 'Anchor,Underline,Strike,Subscript,Superscript,Image',
360 format_tags: 'p;h1;h2;h3;pre;address'
361 } );
362
363 </script>
364 </div>
365
366 <br>
367
368 <div>
369 <label for="editor5">
370 Editor 5:
371 </label>
372 <div class="description">
373 <p>
374 This editor is built on editable <code>&lt;h1&gt;</code> element.
375 <abbr title="Advanced Content Filter">ACF</abbr> takes care of
376 what can be included in <code>&lt;h1&gt;</code>. Note that there
377 are no block styles in Styles combo. Also why lists, indentation,
378 blockquote, div, form and other buttons are missing.
379 </p>
380 <p>
381 <abbr title="Advanced Content Filter">ACF</abbr> makes sure that
382 no disallowed tags will come to <code>&lt;h1&gt;</code> so the final
383 markup is valid. If the user tried to paste some invalid HTML
384 into this editor (let's say a list), it would be automatically
385 converted into plain text.
386 </p>
387 </div>
388 <h1 id="editor5" contenteditable="true">
389 <em>Apollo 11</em> was the spaceflight that landed the first humans, Americans <a href="http://en.wikipedia.org/wiki/Neil_Armstrong" title="Neil Armstrong">Neil Armstrong</a> and <a href="http://en.wikipedia.org/wiki/Buzz_Aldrin" title="Buzz Aldrin">Buzz Aldrin</a>, on the Moon on July 20, 1969, at 20:18 UTC.
390 </h1>
391 </div>
392
393 <br>
394
395 <div>
396 <label for="editor3">
397 Editor 6:
398 </label>
399 <div class="description">
400 <p>
401 This editor is using a custom configuration for <abbr title="Advanced Content Filter">ACF</abbr>.
402 It's using the <a href="http://docs.ckeditor.com/#!/guide/dev_disallowed_content" rel="noopener noreferrer" target="_blank">
403 Disallowed Content</a> property of the filter to eliminate all <code>title</code> attributes.
404 </p>
405
406<pre class="samples">
407CKEDITOR.replace( 'editor6', {
408 allowedContent: {
409 'b i ul ol big small': true,
410 'h1 h2 h3 p blockquote li': {
411 styles: 'text-align'
412 },
413 a: {attributes: '!href,target'},
414 img: {
415 attributes: '!src,alt',
416 styles: 'width,height',
417 classes: 'left,right'
418 }
419 },
420 disallowedContent: '*{title*}'
421} );
422</pre>
423 </div>
424 <textarea cols="80" id="editor6" name="editor6" rows="10">
425 &lt;h1&gt;&lt;img alt=&quot;Saturn V carrying Apollo 11&quot; class=&quot;right&quot; src=&quot;assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
426 </textarea>
427 <script>
428
429 CKEDITOR.replace( 'editor6', {
430 allowedContent: {
431 'b i ul ol big small': true,
432 'h1 h2 h3 p blockquote li': {
433 styles: 'text-align'
434 },
435 a: {attributes: '!href,target'},
436 img: {
437 attributes: '!src,alt',
438 styles: 'width,height',
439 classes: 'left,right'
440 }
441 },
442 disallowedContent: '*{title*}'
443 } );
444
445 </script>
446 </div>
447
448 <br>
449
450 <div>
451 <label for="editor7">
452 Editor 7:
453 </label>
454 <div class="description">
455 <p>
456 This editor is using a custom configuration for <abbr title="Advanced Content Filter">ACF</abbr>.
457 It's using the <a href="http://docs.ckeditor.com/#!/guide/dev_disallowed_content" rel="noopener noreferrer" target="_blank">
458 Disallowed Content</a> property of the filter to eliminate all <code>a</code> and <code>img</code> tags,
459 while allowing all other tags.
460 </p>
461<pre class="samples">
462CKEDITOR.replace( 'editor7', {
463 allowedContent: {
464 // Allow all content.
465 $1: {
466 elements: CKEDITOR.dtd,
467 attributes: true,
468 styles: true,
469 classes: true
470 }
471 },
472 disallowedContent: 'img a'
473} );
474</pre>
475 </div>
476 <textarea cols="80" id="editor7" name="editor7" rows="10">
477 &lt;h1&gt;&lt;img alt=&quot;Saturn V carrying Apollo 11&quot; class=&quot;right&quot; src=&quot;assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
478 </textarea>
479 <script>
480
481 CKEDITOR.replace( 'editor7', {
482 allowedContent: {
483 // allow all content
484 $1: {
485 elements: CKEDITOR.dtd,
486 attributes: true,
487 styles: true,
488 classes: true
489 }
490 },
491 disallowedContent: 'img a'
492 } );
493
494 </script>
495 </div>
496
497 <div id="footer">
498 <hr>
499 <p>
500 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
501 </p>
502 <p id="copy">
503 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
504 Knabben. All rights reserved.
505 </p>
506 </div>
507</body>
508</html>
diff --git a/release/samples/old/dialog/assets/my_dialog.js b/release/samples/old/dialog/assets/my_dialog.js
new file mode 100644
index 0000000..fcd1a43
--- /dev/null
+++ b/release/samples/old/dialog/assets/my_dialog.js
@@ -0,0 +1,48 @@
1/**
2 * Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license
4 */
5
6CKEDITOR.dialog.add( 'myDialog', function() {
7 return {
8 title: 'My Dialog',
9 minWidth: 400,
10 minHeight: 200,
11 contents: [
12 {
13 id: 'tab1',
14 label: 'First Tab',
15 title: 'First Tab',
16 elements: [
17 {
18 id: 'input1',
19 type: 'text',
20 label: 'Text Field'
21 },
22 {
23 id: 'select1',
24 type: 'select',
25 label: 'Select Field',
26 items: [
27 [ 'option1', 'value1' ],
28 [ 'option2', 'value2' ]
29 ]
30 }
31 ]
32 },
33 {
34 id: 'tab2',
35 label: 'Second Tab',
36 title: 'Second Tab',
37 elements: [
38 {
39 id: 'button1',
40 type: 'button',
41 label: 'Button Field'
42 }
43 ]
44 }
45 ]
46 };
47} );
48
diff --git a/release/samples/old/dialog/dialog.html b/release/samples/old/dialog/dialog.html
new file mode 100644
index 0000000..0f22a1a
--- /dev/null
+++ b/release/samples/old/dialog/dialog.html
@@ -0,0 +1,190 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Using API to Customize Dialog Windows &mdash; CKEditor Sample</title>
10 <script src="../../../ckeditor.js"></script>
11 <link rel="stylesheet" href="../../../samples/old/sample.css">
12 <meta name="ckeditor-sample-name" content="Using the JavaScript API to customize dialog windows">
13 <meta name="ckeditor-sample-group" content="Advanced Samples">
14 <meta name="ckeditor-sample-description" content="Using the dialog windows API to customize dialog windows without changing the original editor code.">
15 <style>
16
17 .cke_button__mybutton_icon
18 {
19 display: none !important;
20 }
21
22 .cke_button__mybutton_label
23 {
24 display: inline !important;
25 }
26
27 </style>
28 <script>
29
30 CKEDITOR.on( 'instanceCreated', function( ev ){
31 var editor = ev.editor;
32
33 // Listen for the "pluginsLoaded" event, so we are sure that the
34 // "dialog" plugin has been loaded and we are able to do our
35 // customizations.
36 editor.on( 'pluginsLoaded', function() {
37
38 // If our custom dialog has not been registered, do that now.
39 if ( !CKEDITOR.dialog.exists( 'myDialog' ) ) {
40 // We need to do the following trick to find out the dialog
41 // definition file URL path. In the real world, you would simply
42 // point to an absolute path directly, like "/mydir/mydialog.js".
43 var href = document.location.href.split( '/' );
44 href.pop();
45 href.push( 'assets/my_dialog.js' );
46 href = href.join( '/' );
47
48 // Finally, register the dialog.
49 CKEDITOR.dialog.add( 'myDialog', href );
50 }
51
52 // Register the command used to open the dialog.
53 editor.addCommand( 'myDialogCmd', new CKEDITOR.dialogCommand( 'myDialog' ) );
54
55 // Add the a custom toolbar buttons, which fires the above
56 // command..
57 editor.ui.add( 'MyButton', CKEDITOR.UI_BUTTON, {
58 label: 'My Dialog',
59 command: 'myDialogCmd'
60 });
61 });
62 });
63
64 // When opening a dialog, its "definition" is created for it, for
65 // each editor instance. The "dialogDefinition" event is then
66 // fired. We should use this event to make customizations to the
67 // definition of existing dialogs.
68 CKEDITOR.on( 'dialogDefinition', function( ev ) {
69 // Take the dialog name and its definition from the event data.
70 var dialogName = ev.data.name;
71 var dialogDefinition = ev.data.definition;
72
73 // Check if the definition is from the dialog we're
74 // interested on (the "Link" dialog).
75 if ( dialogName == 'myDialog' && ev.editor.name == 'editor2' ) {
76 // Get a reference to the "Link Info" tab.
77 var infoTab = dialogDefinition.getContents( 'tab1' );
78
79 // Add a new text field to the "tab1" tab page.
80 infoTab.add( {
81 type: 'text',
82 label: 'My Custom Field',
83 id: 'customField',
84 'default': 'Sample!',
85 validate: function() {
86 if ( ( /\d/ ).test( this.getValue() ) )
87 return 'My Custom Field must not contain digits';
88 }
89 });
90
91 // Remove the "select1" field from the "tab1" tab.
92 infoTab.remove( 'select1' );
93
94 // Set the default value for "input1" field.
95 var input1 = infoTab.get( 'input1' );
96 input1[ 'default' ] = 'www.example.com';
97
98 // Remove the "tab2" tab page.
99 dialogDefinition.removeContents( 'tab2' );
100
101 // Add a new tab to the "Link" dialog.
102 dialogDefinition.addContents( {
103 id: 'customTab',
104 label: 'My Tab',
105 accessKey: 'M',
106 elements: [
107 {
108 id: 'myField1',
109 type: 'text',
110 label: 'My Text Field'
111 },
112 {
113 id: 'myField2',
114 type: 'text',
115 label: 'Another Text Field'
116 }
117 ]
118 });
119
120 // Provide the focus handler to start initial focus in "customField" field.
121 dialogDefinition.onFocus = function() {
122 var urlField = this.getContentElement( 'tab1', 'customField' );
123 urlField.select();
124 };
125 }
126 });
127
128 var config = {
129 extraPlugins: 'dialog',
130 toolbar: [ [ 'MyButton' ] ]
131 };
132
133 </script>
134</head>
135<body>
136 <h1 class="samples">
137 <a href="../../../samples/old/index.html">CKEditor Samples</a> &raquo; Using CKEditor Dialog API
138 </h1>
139 <div class="warning deprecated">
140 This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
141 </div>
142 <div class="description">
143 <p>
144 This sample shows how to use the
145 <a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.dialog">CKEditor Dialog API</a>
146 to customize CKEditor dialog windows without changing the original editor code.
147 The following customizations are being done in the example below:
148 </p>
149 <p>
150 For details on how to create this setup check the source code of this sample page.
151 </p>
152 </div>
153 <p>A custom dialog is added to the editors using the <code>pluginsLoaded</code> event, from an external <a target="_blank" href="assets/my_dialog.js">dialog definition file</a>:</p>
154 <ol>
155 <li><strong>Creating a custom dialog window</strong> &ndash; "My Dialog" dialog window opened with the "My Dialog" toolbar button.</li>
156 <li><strong>Creating a custom button</strong> &ndash; Add button to open the dialog with "My Dialog" toolbar button.</li>
157 </ol>
158 <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
159 <script>
160 // Replace the <textarea id="editor1"> with an CKEditor instance.
161 CKEDITOR.replace( 'editor1', config );
162 </script>
163 <p>The below editor modify the dialog definition of the above added dialog using the <code>dialogDefinition</code> event:</p>
164 <ol>
165 <li><strong>Adding dialog tab</strong> &ndash; Add new tab "My Tab" to dialog window.</li>
166 <li><strong>Removing a dialog window tab</strong> &ndash; Remove "Second Tab" page from the dialog window.</li>
167 <li><strong>Adding dialog window fields</strong> &ndash; Add "My Custom Field" to the dialog window.</li>
168 <li><strong>Removing dialog window field</strong> &ndash; Remove "Select Field" selection field from the dialog window.</li>
169 <li><strong>Setting default values for dialog window fields</strong> &ndash; Set default value of "Text Field" text field. </li>
170 <li><strong>Setup initial focus for dialog window</strong> &ndash; Put initial focus on "My Custom Field" text field. </li>
171 </ol>
172 <textarea cols="80" id="editor2" name="editor2" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
173 <script>
174
175 // Replace the <textarea id="editor1"> with an CKEditor instance.
176 CKEDITOR.replace( 'editor2', config );
177
178 </script>
179 <div id="footer">
180 <hr>
181 <p>
182 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
183 </p>
184 <p id="copy">
185 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
186 Knabben. All rights reserved.
187 </p>
188 </div>
189</body>
190</html>
diff --git a/release/samples/old/divreplace.html b/release/samples/old/divreplace.html
new file mode 100644
index 0000000..c6724f0
--- /dev/null
+++ b/release/samples/old/divreplace.html
@@ -0,0 +1,144 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Replace DIV &mdash; CKEditor Sample</title>
10 <script src="../../ckeditor.js"></script>
11 <link href="sample.css" rel="stylesheet">
12 <style>
13
14 div.editable
15 {
16 border: solid 2px transparent;
17 padding-left: 15px;
18 padding-right: 15px;
19 }
20
21 div.editable:hover
22 {
23 border-color: black;
24 }
25
26 </style>
27 <script>
28
29 // Uncomment the following code to test the "Timeout Loading Method".
30 // CKEDITOR.loadFullCoreTimeout = 5;
31
32 window.onload = function() {
33 // Listen to the double click event.
34 if ( window.addEventListener )
35 document.body.addEventListener( 'dblclick', onDoubleClick, false );
36 else if ( window.attachEvent )
37 document.body.attachEvent( 'ondblclick', onDoubleClick );
38
39 };
40
41 function onDoubleClick( ev ) {
42 // Get the element which fired the event. This is not necessarily the
43 // element to which the event has been attached.
44 var element = ev.target || ev.srcElement;
45
46 // Find out the div that holds this element.
47 var name;
48
49 do {
50 element = element.parentNode;
51 }
52 while ( element && ( name = element.nodeName.toLowerCase() ) &&
53 ( name != 'div' || element.className.indexOf( 'editable' ) == -1 ) && name != 'body' );
54
55 if ( name == 'div' && element.className.indexOf( 'editable' ) != -1 )
56 replaceDiv( element );
57 }
58
59 var editor;
60
61 function replaceDiv( div ) {
62 if ( editor )
63 editor.destroy();
64
65 editor = CKEDITOR.replace( div );
66 }
67
68 </script>
69</head>
70<body>
71 <h1 class="samples">
72 <a href="index.html">CKEditor Samples</a> &raquo; Replace DIV with CKEditor on the Fly
73 </h1>
74 <div class="warning deprecated">
75 This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
76 </div>
77 <div class="description">
78 <p>
79 This sample shows how to automatically replace <code>&lt;div&gt;</code> elements
80 with a CKEditor instance on the fly, following user's doubleclick. The content
81 that was previously placed inside the <code>&lt;div&gt;</code> element will now
82 be moved into CKEditor editing area.
83 </p>
84 <p>
85 For details on how to create this setup check the source code of this sample page.
86 </p>
87 </div>
88 <p>
89 Double-click any of the following <code>&lt;div&gt;</code> elements to transform them into
90 editor instances.
91 </p>
92 <div class="editable">
93 <h3>
94 Part 1
95 </h3>
96 <p>
97 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
98 semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
99 rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
100 nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
101 eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
102 </p>
103 </div>
104 <div class="editable">
105 <h3>
106 Part 2
107 </h3>
108 <p>
109 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
110 semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
111 rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
112 nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
113 eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
114 </p>
115 <p>
116 Donec velit. Mauris massa. Vestibulum non nulla. Nam suscipit arcu nec elit. Phasellus
117 sollicitudin iaculis ante. Ut non mauris et sapien tincidunt adipiscing. Vestibulum
118 vitae leo. Suspendisse nec mi tristique nulla laoreet vulputate.
119 </p>
120 </div>
121 <div class="editable">
122 <h3>
123 Part 3
124 </h3>
125 <p>
126 Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cras et ipsum quis mi
127 semper accumsan. Integer pretium dui id massa. Suspendisse in nisl sit amet urna
128 rutrum imperdiet. Nulla eu tellus. Donec ante nisi, ullamcorper quis, fringilla
129 nec, sagittis eleifend, pede. Nulla commodo interdum massa. Donec id metus. Fusce
130 eu ipsum. Suspendisse auctor. Phasellus fermentum porttitor risus.
131 </p>
132 </div>
133 <div id="footer">
134 <hr>
135 <p>
136 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
137 </p>
138 <p id="copy">
139 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
140 Knabben. All rights reserved.
141 </p>
142 </div>
143</body>
144</html>
diff --git a/release/samples/old/enterkey/enterkey.html b/release/samples/old/enterkey/enterkey.html
new file mode 100644
index 0000000..79afee3
--- /dev/null
+++ b/release/samples/old/enterkey/enterkey.html
@@ -0,0 +1,106 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>ENTER Key Configuration &mdash; CKEditor Sample</title>
10 <script src="../../../ckeditor.js"></script>
11 <link href="../../../samples/old/sample.css" rel="stylesheet">
12 <meta name="ckeditor-sample-name" content="Using the &quot;Enter&quot; key in CKEditor">
13 <meta name="ckeditor-sample-group" content="Advanced Samples">
14 <meta name="ckeditor-sample-description" content="Configuring the behavior of &lt;em&gt;Enter&lt;/em&gt; and &lt;em&gt;Shift+Enter&lt;/em&gt; keys.">
15 <script>
16
17 var editor;
18
19 function changeEnter() {
20 // If we already have an editor, let's destroy it first.
21 if ( editor )
22 editor.destroy( true );
23
24 // Create the editor again, with the appropriate settings.
25 editor = CKEDITOR.replace( 'editor1', {
26 extraPlugins: 'enterkey',
27 enterMode: Number( document.getElementById( 'xEnter' ).value ),
28 shiftEnterMode: Number( document.getElementById( 'xShiftEnter' ).value )
29 });
30 }
31
32 window.onload = changeEnter;
33
34 </script>
35</head>
36<body>
37 <h1 class="samples">
38 <a href="../../../samples/old/index.html">CKEditor Samples</a> &raquo; ENTER Key Configuration
39 </h1>
40 <div class="warning deprecated">
41 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/enterkey.html">brand new version in CKEditor SDK</a>.
42 </div>
43 <div class="description">
44 <p>
45 This sample shows how to configure the <em>Enter</em> and <em>Shift+Enter</em> keys
46 to perform actions specified in the
47 <a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-enterMode"><code>enterMode</code></a>
48 and <a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-shiftEnterMode"><code>shiftEnterMode</code></a>
49 parameters, respectively.
50 You can choose from the following options:
51 </p>
52 <ul class="samples">
53 <li><strong><code>ENTER_P</code></strong> &ndash; new <code>&lt;p&gt;</code> paragraphs are created;</li>
54 <li><strong><code>ENTER_BR</code></strong> &ndash; lines are broken with <code>&lt;br&gt;</code> elements;</li>
55 <li><strong><code>ENTER_DIV</code></strong> &ndash; new <code>&lt;div&gt;</code> blocks are created.</li>
56 </ul>
57 <p>
58 The sample code below shows how to configure CKEditor to create a <code>&lt;div&gt;</code> block when <em>Enter</em> key is pressed.
59 </p>
60<pre class="samples">
61CKEDITOR.replace( '<em>textarea_id</em>', {
62 <strong>enterMode: CKEDITOR.ENTER_DIV</strong>
63});</pre>
64 <p>
65 Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
66 the <code>&lt;textarea&gt;</code> element to be replaced.
67 </p>
68 </div>
69 <div style="float: left; margin-right: 20px">
70 When <em>Enter</em> is pressed:<br>
71 <select id="xEnter" onchange="changeEnter();">
72 <option selected="selected" value="1">Create a new &lt;P&gt; (recommended)</option>
73 <option value="3">Create a new &lt;DIV&gt;</option>
74 <option value="2">Break the line with a &lt;BR&gt;</option>
75 </select>
76 </div>
77 <div style="float: left">
78 When <em>Shift+Enter</em> is pressed:<br>
79 <select id="xShiftEnter" onchange="changeEnter();">
80 <option value="1">Create a new &lt;P&gt;</option>
81 <option value="3">Create a new &lt;DIV&gt;</option>
82 <option selected="selected" value="2">Break the line with a &lt;BR&gt; (recommended)</option>
83 </select>
84 </div>
85 <br style="clear: both">
86 <form action="../../../samples/sample_posteddata.php" method="post">
87 <p>
88 <br>
89 <textarea cols="80" id="editor1" name="editor1" rows="10">This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.</textarea>
90 </p>
91 <p>
92 <input type="submit" value="Submit">
93 </p>
94 </form>
95 <div id="footer">
96 <hr>
97 <p>
98 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
99 </p>
100 <p id="copy">
101 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
102 Knabben. All rights reserved.
103 </p>
104 </div>
105</body>
106</html>
diff --git a/release/samples/old/htmlwriter/assets/outputforflash/outputforflash.fla b/release/samples/old/htmlwriter/assets/outputforflash/outputforflash.fla
new file mode 100644
index 0000000..27e68cc
--- /dev/null
+++ b/release/samples/old/htmlwriter/assets/outputforflash/outputforflash.fla
Binary files differ
diff --git a/release/samples/old/htmlwriter/assets/outputforflash/outputforflash.swf b/release/samples/old/htmlwriter/assets/outputforflash/outputforflash.swf
new file mode 100644
index 0000000..dbe17b6
--- /dev/null
+++ b/release/samples/old/htmlwriter/assets/outputforflash/outputforflash.swf
Binary files differ
diff --git a/release/samples/old/htmlwriter/assets/outputforflash/swfobject.js b/release/samples/old/htmlwriter/assets/outputforflash/swfobject.js
new file mode 100644
index 0000000..0700921
--- /dev/null
+++ b/release/samples/old/htmlwriter/assets/outputforflash/swfobject.js
@@ -0,0 +1,19 @@
1var swfobject=function(){function w(){if(!u){try{var a=d.getElementsByTagName("body")[0].appendChild(d.createElement("span"));a.parentNode.removeChild(a)}catch(b){return}u=!0;for(var a=z.length,c=0;c<a;c++)z[c]()}}function M(a){u?a():z[z.length]=a}function N(a){if("undefined"!=typeof n.addEventListener)n.addEventListener("load",a,!1);else if("undefined"!=typeof d.addEventListener)d.addEventListener("load",a,!1);else if("undefined"!=typeof n.attachEvent)U(n,"onload",a);else if("function"==typeof n.onload){var b=
2n.onload;n.onload=function(){b();a()}}else n.onload=a}function V(){var a=d.getElementsByTagName("body")[0],b=d.createElement("object");b.setAttribute("type","application/x-shockwave-flash");var c=a.appendChild(b);if(c){var f=0;(function(){if("undefined"!=typeof c.GetVariable){var g=c.GetVariable("$version");g&&(g=g.split(" ")[1].split(","),e.pv=[parseInt(g[0],10),parseInt(g[1],10),parseInt(g[2],10)])}else if(10>f){f++;setTimeout(arguments.callee,10);return}a.removeChild(b);c=null;E()})()}else E()}
3function E(){var a=r.length;if(0<a)for(var b=0;b<a;b++){var c=r[b].id,f=r[b].callbackFn,g={success:!1,id:c};if(0<e.pv[0]){var d=p(c);if(d)if(!A(r[b].swfVersion)||e.wk&&312>e.wk)if(r[b].expressInstall&&F()){g={};g.data=r[b].expressInstall;g.width=d.getAttribute("width")||"0";g.height=d.getAttribute("height")||"0";d.getAttribute("class")&&(g.styleclass=d.getAttribute("class"));d.getAttribute("align")&&(g.align=d.getAttribute("align"));for(var h={},d=d.getElementsByTagName("param"),k=d.length,l=0;l<
4k;l++)"movie"!=d[l].getAttribute("name").toLowerCase()&&(h[d[l].getAttribute("name")]=d[l].getAttribute("value"));G(g,h,c,f)}else W(d),f&&f(g);else v(c,!0),f&&(g.success=!0,g.ref=H(c),f(g))}else v(c,!0),f&&((c=H(c))&&"undefined"!=typeof c.SetVariable&&(g.success=!0,g.ref=c),f(g))}}function H(a){var b=null;(a=p(a))&&"OBJECT"==a.nodeName&&("undefined"!=typeof a.SetVariable?b=a:(a=a.getElementsByTagName("object")[0])&&(b=a));return b}function F(){return!B&&A("6.0.65")&&(e.win||e.mac)&&!(e.wk&&312>e.wk)}
5function G(a,b,c,f){B=!0;I=f||null;O={success:!1,id:c};var g=p(c);if(g){"OBJECT"==g.nodeName?(y=J(g),C=null):(y=g,C=c);a.id="SWFObjectExprInst";if("undefined"==typeof a.width||!/%$/.test(a.width)&&310>parseInt(a.width,10))a.width="310";if("undefined"==typeof a.height||!/%$/.test(a.height)&&137>parseInt(a.height,10))a.height="137";d.title=d.title.slice(0,47)+" - Flash Player Installation";f=e.ie&&e.win?"ActiveX":"PlugIn";f="MMredirectURL\x3d"+n.location.toString().replace(/&/g,"%26")+"\x26MMplayerType\x3d"+
6f+"\x26MMdoctitle\x3d"+d.title;b.flashvars="undefined"!=typeof b.flashvars?b.flashvars+("\x26"+f):f;e.ie&&e.win&&4!=g.readyState&&(f=d.createElement("div"),c+="SWFObjectNew",f.setAttribute("id",c),g.parentNode.insertBefore(f,g),g.style.display="none",function(){4==g.readyState?g.parentNode.removeChild(g):setTimeout(arguments.callee,10)}());K(a,b,c)}}function W(a){if(e.ie&&e.win&&4!=a.readyState){var b=d.createElement("div");a.parentNode.insertBefore(b,a);b.parentNode.replaceChild(J(a),b);a.style.display=
7"none";(function(){4==a.readyState?a.parentNode.removeChild(a):setTimeout(arguments.callee,10)})()}else a.parentNode.replaceChild(J(a),a)}function J(a){var b=d.createElement("div");if(e.win&&e.ie)b.innerHTML=a.innerHTML;else if(a=a.getElementsByTagName("object")[0])if(a=a.childNodes)for(var c=a.length,f=0;f<c;f++)1==a[f].nodeType&&"PARAM"==a[f].nodeName||8==a[f].nodeType||b.appendChild(a[f].cloneNode(!0));return b}function K(a,b,c){var f,g=p(c);if(e.wk&&312>e.wk)return f;if(g)if("undefined"==typeof a.id&&
8(a.id=c),e.ie&&e.win){var q="",h;for(h in a)a[h]!=Object.prototype[h]&&("data"==h.toLowerCase()?b.movie=a[h]:"styleclass"==h.toLowerCase()?q+=' class\x3d"'+a[h]+'"':"classid"!=h.toLowerCase()&&(q+=" "+h+'\x3d"'+a[h]+'"'));h="";for(var k in b)b[k]!=Object.prototype[k]&&(h+='\x3cparam name\x3d"'+k+'" value\x3d"'+b[k]+'" /\x3e');g.outerHTML='\x3cobject classid\x3d"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+q+"\x3e"+h+"\x3c/object\x3e";D[D.length]=a.id;f=p(a.id)}else{k=d.createElement("object");k.setAttribute("type",
9"application/x-shockwave-flash");for(var l in a)a[l]!=Object.prototype[l]&&("styleclass"==l.toLowerCase()?k.setAttribute("class",a[l]):"classid"!=l.toLowerCase()&&k.setAttribute(l,a[l]));for(q in b)b[q]!=Object.prototype[q]&&"movie"!=q.toLowerCase()&&(a=k,h=q,l=b[q],c=d.createElement("param"),c.setAttribute("name",h),c.setAttribute("value",l),a.appendChild(c));g.parentNode.replaceChild(k,g);f=k}return f}function P(a){var b=p(a);b&&"OBJECT"==b.nodeName&&(e.ie&&e.win?(b.style.display="none",function(){if(4==
10b.readyState){var c=p(a);if(c){for(var f in c)"function"==typeof c[f]&&(c[f]=null);c.parentNode.removeChild(c)}}else setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))}function p(a){var b=null;try{b=d.getElementById(a)}catch(c){}return b}function U(a,b,c){a.attachEvent(b,c);x[x.length]=[a,b,c]}function A(a){var b=e.pv;a=a.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||0;a[2]=parseInt(a[2],10)||0;return b[0]>a[0]||b[0]==a[0]&&b[1]>a[1]||b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]?!0:
11!1}function Q(a,b,c,f){if(!e.ie||!e.mac){var g=d.getElementsByTagName("head")[0];g&&(c=c&&"string"==typeof c?c:"screen",f&&(L=m=null),m&&L==c||(f=d.createElement("style"),f.setAttribute("type","text/css"),f.setAttribute("media",c),m=g.appendChild(f),e.ie&&e.win&&"undefined"!=typeof d.styleSheets&&0<d.styleSheets.length&&(m=d.styleSheets[d.styleSheets.length-1]),L=c),e.ie&&e.win?m&&"object"==typeof m.addRule&&m.addRule(a,b):m&&"undefined"!=typeof d.createTextNode&&m.appendChild(d.createTextNode(a+
12" {"+b+"}")))}}function v(a,b){if(R){var c=b?"visible":"hidden";u&&p(a)?p(a).style.visibility=c:Q("#"+a,"visibility:"+c)}}function S(a){return null!=/[\\\"<>\.;]/.exec(a)&&"undefined"!=typeof encodeURIComponent?encodeURIComponent(a):a}var n=window,d=document,t=navigator,T=!1,z=[function(){T?V():E()}],r=[],D=[],x=[],y,C,I,O,u=!1,B=!1,m,L,R=!0,e=function(){var a="undefined"!=typeof d.getElementById&&"undefined"!=typeof d.getElementsByTagName&&"undefined"!=typeof d.createElement,b=t.userAgent.toLowerCase(),
13c=t.platform.toLowerCase(),f=c?/win/.test(c):/win/.test(b),c=c?/mac/.test(c):/mac/.test(b),b=/webkit/.test(b)?parseFloat(b.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,g=!+"\v1",e=[0,0,0],h=null;if("undefined"!=typeof t.plugins&&"object"==typeof t.plugins["Shockwave Flash"])!(h=t.plugins["Shockwave Flash"].description)||"undefined"!=typeof t.mimeTypes&&t.mimeTypes["application/x-shockwave-flash"]&&!t.mimeTypes["application/x-shockwave-flash"].enabledPlugin||(T=!0,g=!1,h=h.replace(/^.*\s+(\S+\s+\S+$)/,
14"$1"),e[0]=parseInt(h.replace(/^(.*)\..*$/,"$1"),10),e[1]=parseInt(h.replace(/^.*\.(.*)\s.*$/,"$1"),10),e[2]=/[a-zA-Z]/.test(h)?parseInt(h.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if("undefined"!=typeof n.ActiveXObject)try{var k=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");k&&(h=k.GetVariable("$version"))&&(g=!0,h=h.split(" ")[1].split(","),e=[parseInt(h[0],10),parseInt(h[1],10),parseInt(h[2],10)])}catch(l){}return{w3:a,pv:e,wk:b,ie:g,win:f,mac:c}}();(function(){e.w3&&(("undefined"!=typeof d.readyState&&
15"complete"==d.readyState||"undefined"==typeof d.readyState&&(d.getElementsByTagName("body")[0]||d.body))&&w(),u||("undefined"!=typeof d.addEventListener&&d.addEventListener("DOMContentLoaded",w,!1),e.ie&&e.win&&(d.attachEvent("onreadystatechange",function(){"complete"==d.readyState&&(d.detachEvent("onreadystatechange",arguments.callee),w())}),n==top&&function(){if(!u){try{d.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}w()}}()),e.wk&&function(){u||(/loaded|complete/.test(d.readyState)?
16w():setTimeout(arguments.callee,0))}(),N(w)))})();(function(){e.ie&&e.win&&window.attachEvent("onunload",function(){for(var a=x.length,b=0;b<a;b++)x[b][0].detachEvent(x[b][1],x[b][2]);a=D.length;for(b=0;b<a;b++)P(D[b]);for(var c in e)e[c]=null;e=null;for(var f in swfobject)swfobject[f]=null;swfobject=null})})();return{registerObject:function(a,b,c,f){if(e.w3&&a&&b){var d={};d.id=a;d.swfVersion=b;d.expressInstall=c;d.callbackFn=f;r[r.length]=d;v(a,!1)}else f&&f({success:!1,id:a})},getObjectById:function(a){if(e.w3)return H(a)},
17embedSWF:function(a,b,c,d,g,q,h,k,l,n){var p={success:!1,id:b};e.w3&&!(e.wk&&312>e.wk)&&a&&b&&c&&d&&g?(v(b,!1),M(function(){c+="";d+="";var e={};if(l&&"object"===typeof l)for(var m in l)e[m]=l[m];e.data=a;e.width=c;e.height=d;m={};if(k&&"object"===typeof k)for(var r in k)m[r]=k[r];if(h&&"object"===typeof h)for(var t in h)m.flashvars="undefined"!=typeof m.flashvars?m.flashvars+("\x26"+t+"\x3d"+h[t]):t+"\x3d"+h[t];if(A(g))r=K(e,m,b),e.id==b&&v(b,!0),p.success=!0,p.ref=r;else{if(q&&F()){e.data=q;G(e,
18m,b,n);return}v(b,!0)}n&&n(p)})):n&&n(p)},switchOffAutoHideShow:function(){R=!1},ua:e,getFlashPlayerVersion:function(){return{major:e.pv[0],minor:e.pv[1],release:e.pv[2]}},hasFlashPlayerVersion:A,createSWF:function(a,b,c){if(e.w3)return K(a,b,c)},showExpressInstall:function(a,b,c,d){e.w3&&F()&&G(a,b,c,d)},removeSWF:function(a){e.w3&&P(a)},createCSS:function(a,b,c,d){e.w3&&Q(a,b,c,d)},addDomLoadEvent:M,addLoadEvent:N,getQueryParamValue:function(a){var b=d.location.search||d.location.hash;if(b){/\?/.test(b)&&
19(b=b.split("?")[1]);if(null==a)return S(b);for(var b=b.split("\x26"),c=0;c<b.length;c++)if(b[c].substring(0,b[c].indexOf("\x3d"))==a)return S(b[c].substring(b[c].indexOf("\x3d")+1))}return""},expressInstallCallback:function(){if(B){var a=p("SWFObjectExprInst");a&&y&&(a.parentNode.replaceChild(y,a),C&&(v(C,!0),e.ie&&e.win&&(y.style.display="block")),I&&I(O));B=!1}}}}(); \ No newline at end of file
diff --git a/release/samples/old/htmlwriter/outputforflash.html b/release/samples/old/htmlwriter/outputforflash.html
new file mode 100644
index 0000000..f72616d
--- /dev/null
+++ b/release/samples/old/htmlwriter/outputforflash.html
@@ -0,0 +1,283 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Output for Flash &mdash; CKEditor Sample</title>
10 <script src="../../../ckeditor.js"></script>
11 <script src="../../../samples/old/sample.js"></script>
12 <script src="assets/outputforflash/swfobject.js"></script>
13 <link href="../../../samples/old/sample.css" rel="stylesheet">
14 <meta name="ckeditor-sample-required-plugins" content="sourcearea">
15 <meta name="ckeditor-sample-name" content="Output for Flash">
16 <meta name="ckeditor-sample-group" content="Advanced Samples">
17 <meta name="ckeditor-sample-description" content="Configuring CKEditor to produce HTML code that can be used with Adobe Flash.">
18 <style>
19
20 .alert
21 {
22 background: #ffa84c;
23 padding: 10px 15px;
24 font-weight: bold;
25 display: block;
26 margin-bottom: 20px;
27 }
28
29 </style>
30</head>
31<body>
32 <h1 class="samples">
33 <a href="../../../samples/old/index.html">CKEditor Samples</a> &raquo; Producing Flash Compliant HTML Output
34 </h1>
35 <div class="warning deprecated">
36 This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
37 </div>
38 <div class="description">
39 <p>
40 This sample shows how to configure CKEditor to output
41 HTML code that can be used with
42 <a class="samples" href="http://www.adobe.com/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&amp;file=00000922.html">
43 Adobe Flash</a>.
44 The code will contain a subset of standard HTML elements like <code>&lt;b&gt;</code>,
45 <code>&lt;i&gt;</code>, and <code>&lt;p&gt;</code> as well as HTML attributes.
46 </p>
47 <p>
48 To add a CKEditor instance outputting Flash compliant HTML code, load the editor using a standard
49 JavaScript call, and define CKEditor features to use HTML elements and attributes.
50 </p>
51 <p>
52 For details on how to create this setup check the source code of this sample page.
53 </p>
54 </div>
55 <p>
56 To see how it works, create some content in the editing area of CKEditor on the left
57 and send it to the Flash object on the right side of the page by using the
58 <strong>Send to Flash</strong> button.
59 </p>
60 <table style="width: 100%; border-spacing: 0; border-collapse:collapse;">
61 <tr>
62 <td style="width: 100%">
63 <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;&lt;b&gt;&lt;font size=&quot;18&quot; style=&quot;font-size:18px;&quot;&gt;Flash and HTML&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;It is possible to have &lt;a href=&quot;http://ckeditor.com&quot;&gt;CKEditor&lt;/a&gt; creating content that will be later loaded inside &lt;b&gt;Flash&lt;/b&gt; objects and animations.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Flash has a few limitations when dealing with HTML:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;It has limited support on tags.&lt;/li&gt;&lt;li&gt;There is no margin between block elements, like paragraphs.&lt;/li&gt;&lt;/ul&gt;</textarea>
64 <script>
65
66 if ( document.location.protocol == 'file:' )
67 alert( 'Warning: This samples does not work when loaded from local filesystem' +
68 'due to security restrictions implemented in Flash.' +
69 '\n\nPlease load the sample from a web server instead.' );
70
71 var editor = CKEDITOR.replace( 'editor1', {
72 /*
73 * Ensure that htmlwriter plugin, which is required for this sample, is loaded.
74 */
75 extraPlugins: 'htmlwriter',
76
77 height: 290,
78 width: '100%',
79 toolbar: [
80 [ 'Source', '-', 'Bold', 'Italic', 'Underline', '-', 'BulletedList', '-', 'Link', 'Unlink' ],
81 [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ],
82 '/',
83 [ 'Font', 'FontSize' ],
84 [ 'TextColor', '-', 'About' ]
85 ],
86
87 /*
88 * Style sheet for the contents
89 */
90 contentsCss: 'body {color:#000; background-color#FFF; font-family: Arial; font-size:80%;} p, ol, ul {margin-top: 0px; margin-bottom: 0px;}',
91
92 /*
93 * Quirks doctype
94 */
95 docType: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">',
96
97 /*
98 * Core styles.
99 */
100 coreStyles_bold: { element: 'b' },
101 coreStyles_italic: { element: 'i' },
102 coreStyles_underline: { element: 'u' },
103
104 /*
105 * Font face.
106 */
107
108 // Define the way font elements will be applied to the document. The "font"
109 // element will be used.
110 font_style: {
111 element: 'font',
112 attributes: { 'face': '#(family)' }
113 },
114
115 /*
116 * Font sizes.
117 */
118
119 // The CSS part of the font sizes isn't used by Flash, it is there to get the
120 // font rendered correctly in CKEditor.
121 fontSize_sizes: '8px/8;9px/9;10px/10;11px/11;12px/12;14px/14;16px/16;18px/18;20px/20;22px/22;24px/24;26px/26;28px/28;36px/36;48px/48;72px/72',
122 fontSize_style: {
123 element: 'font',
124 attributes: { 'size': '#(size)' },
125 styles: { 'font-size': '#(size)px' }
126 } ,
127
128 /*
129 * Font colors.
130 */
131 colorButton_enableMore: true,
132
133 colorButton_foreStyle: {
134 element: 'font',
135 attributes: { 'color': '#(color)' }
136 },
137
138 colorButton_backStyle: {
139 element: 'font',
140 styles: { 'background-color': '#(color)' }
141 },
142
143 on: { 'instanceReady': configureFlashOutput }
144 });
145
146 /*
147 * Adjust the behavior of the dataProcessor to match the
148 * requirements of Flash
149 */
150 function configureFlashOutput( ev ) {
151 var editor = ev.editor,
152 dataProcessor = editor.dataProcessor,
153 htmlFilter = dataProcessor && dataProcessor.htmlFilter;
154
155 // Out self closing tags the HTML4 way, like <br>.
156 dataProcessor.writer.selfClosingEnd = '>';
157
158 // Make output formatting match Flash expectations
159 var dtd = CKEDITOR.dtd;
160 for ( var e in CKEDITOR.tools.extend( {}, dtd.$nonBodyContent, dtd.$block, dtd.$listItem, dtd.$tableContent ) ) {
161 dataProcessor.writer.setRules( e, {
162 indent: false,
163 breakBeforeOpen: false,
164 breakAfterOpen: false,
165 breakBeforeClose: false,
166 breakAfterClose: false
167 });
168 }
169 dataProcessor.writer.setRules( 'br', {
170 indent: false,
171 breakBeforeOpen: false,
172 breakAfterOpen: false,
173 breakBeforeClose: false,
174 breakAfterClose: false
175 });
176
177 // Output properties as attributes, not styles.
178 htmlFilter.addRules( {
179 elements: {
180 $: function( element ) {
181 var style, match, width, height, align;
182
183 // Output dimensions of images as width and height
184 if ( element.name == 'img' ) {
185 style = element.attributes.style;
186
187 if ( style ) {
188 // Get the width from the style.
189 match = ( /(?:^|\s)width\s*:\s*(\d+)px/i ).exec( style );
190 width = match && match[1];
191
192 // Get the height from the style.
193 match = ( /(?:^|\s)height\s*:\s*(\d+)px/i ).exec( style );
194 height = match && match[1];
195
196 if ( width ) {
197 element.attributes.style = element.attributes.style.replace( /(?:^|\s)width\s*:\s*(\d+)px;?/i , '' );
198 element.attributes.width = width;
199 }
200
201 if ( height ) {
202 element.attributes.style = element.attributes.style.replace( /(?:^|\s)height\s*:\s*(\d+)px;?/i , '' );
203 element.attributes.height = height;
204 }
205 }
206 }
207
208 // Output alignment of paragraphs using align
209 if ( element.name == 'p' ) {
210 style = element.attributes.style;
211
212 if ( style ) {
213 // Get the align from the style.
214 match = ( /(?:^|\s)text-align\s*:\s*(\w*);?/i ).exec( style );
215 align = match && match[1];
216
217 if ( align ) {
218 element.attributes.style = element.attributes.style.replace( /(?:^|\s)text-align\s*:\s*(\w*);?/i , '' );
219 element.attributes.align = align;
220 }
221 }
222 }
223
224 if ( element.attributes.style === '' )
225 delete element.attributes.style;
226
227 return element;
228 }
229 }
230 });
231 }
232
233 function sendToFlash() {
234 var html = CKEDITOR.instances.editor1.getData() ;
235
236 // Quick fix for link color.
237 html = html.replace( /<a /g, '<font color="#0000FF"><u><a ' )
238 html = html.replace( /<\/a>/g, '</a></u></font>' )
239
240 var flash = document.getElementById( 'ckFlashContainer' ) ;
241 flash.setData( html ) ;
242 }
243
244 CKEDITOR.domReady( function() {
245 if ( !swfobject.hasFlashPlayerVersion( '8' ) ) {
246 CKEDITOR.dom.element.createFromHtml( '<span class="alert">' +
247 'At least Adobe Flash Player 8 is required to run this sample. ' +
248 'You can download it from <a href="http://get.adobe.com/flashplayer">Adobe\'s website</a>.' +
249 '</span>' ).insertBefore( editor.element );
250 }
251
252 swfobject.embedSWF(
253 'assets/outputforflash/outputforflash.swf',
254 'ckFlashContainer',
255 '550',
256 '400',
257 '8',
258 { wmode: 'transparent' }
259 );
260 });
261
262 </script>
263 <p>
264 <input type="button" value="Send to Flash" onclick="sendToFlash();">
265 </p>
266 </td>
267 <td style="vertical-align: top; padding-left: 20px">
268 <div id="ckFlashContainer"></div>
269 </td>
270 </tr>
271 </table>
272 <div id="footer">
273 <hr>
274 <p>
275 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
276 </p>
277 <p id="copy">
278 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
279 Knabben. All rights reserved.
280 </p>
281 </div>
282</body>
283</html>
diff --git a/release/samples/old/htmlwriter/outputhtml.html b/release/samples/old/htmlwriter/outputhtml.html
new file mode 100644
index 0000000..a433025
--- /dev/null
+++ b/release/samples/old/htmlwriter/outputhtml.html
@@ -0,0 +1,224 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>HTML Compliant Output &mdash; CKEditor Sample</title>
10 <script src="../../../ckeditor.js"></script>
11 <script src="../../../samples/old/sample.js"></script>
12 <link href="../../../samples/old/sample.css" rel="stylesheet">
13 <meta name="ckeditor-sample-required-plugins" content="sourcearea">
14 <meta name="ckeditor-sample-name" content="Output HTML">
15 <meta name="ckeditor-sample-group" content="Advanced Samples">
16 <meta name="ckeditor-sample-description" content="Configuring CKEditor to produce legacy HTML 4 code.">
17</head>
18<body>
19 <h1 class="samples">
20 <a href="../../../samples/old/index.html">CKEditor Samples</a> &raquo; Producing HTML Compliant Output
21 </h1>
22 <div class="warning deprecated">
23 This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
24 </div>
25 <div class="description">
26 <p>
27 This sample shows how to configure CKEditor to output valid
28 <a class="samples" href="http://www.w3.org/TR/html401/">HTML 4.01</a> code.
29 Traditional HTML elements like <code>&lt;b&gt;</code>,
30 <code>&lt;i&gt;</code>, and <code>&lt;font&gt;</code> are used in place of
31 <code>&lt;strong&gt;</code>, <code>&lt;em&gt;</code>, and CSS styles.
32 </p>
33 <p>
34 To add a CKEditor instance outputting legacy HTML 4.01 code, load the editor using a standard
35 JavaScript call, and define CKEditor features to use the HTML compliant elements and attributes.
36 </p>
37 <p>
38 A snippet of the configuration code can be seen below; check the source of this page for
39 full definition:
40 </p>
41<pre class="samples">
42CKEDITOR.replace( '<em>textarea_id</em>', {
43 coreStyles_bold: { element: 'b' },
44 coreStyles_italic: { element: 'i' },
45
46 fontSize_style: {
47 element: 'font',
48 attributes: { 'size': '#(size)' }
49 }
50
51 ...
52});</pre>
53 </div>
54 <form action="../../../samples/sample_posteddata.php" method="post">
55 <p>
56 <label for="editor1">
57 Editor 1:
58 </label>
59 <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;b&gt;sample text&lt;/b&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
60 <script>
61
62 CKEDITOR.replace( 'editor1', {
63 /*
64 * Ensure that htmlwriter plugin, which is required for this sample, is loaded.
65 */
66 extraPlugins: 'htmlwriter',
67
68 /*
69 * Style sheet for the contents
70 */
71 contentsCss: 'body {color:#000; background-color#:FFF;}',
72
73 /*
74 * Simple HTML5 doctype
75 */
76 docType: '<!DOCTYPE HTML>',
77
78 /*
79 * Allowed content rules which beside limiting allowed HTML
80 * will also take care of transforming styles to attributes
81 * (currently only for img - see transformation rules defined below).
82 *
83 * Read more: http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter
84 */
85 allowedContent:
86 'h1 h2 h3 p pre[align]; ' +
87 'blockquote code kbd samp var del ins cite q b i u strike ul ol li hr table tbody tr td th caption; ' +
88 'img[!src,alt,align,width,height]; font[!face]; font[!family]; font[!color]; font[!size]; font{!background-color}; a[!href]; a[!name]',
89
90 /*
91 * Core styles.
92 */
93 coreStyles_bold: { element: 'b' },
94 coreStyles_italic: { element: 'i' },
95 coreStyles_underline: { element: 'u' },
96 coreStyles_strike: { element: 'strike' },
97
98 /*
99 * Font face.
100 */
101
102 // Define the way font elements will be applied to the document.
103 // The "font" element will be used.
104 font_style: {
105 element: 'font',
106 attributes: { 'face': '#(family)' }
107 },
108
109 /*
110 * Font sizes.
111 */
112 fontSize_sizes: 'xx-small/1;x-small/2;small/3;medium/4;large/5;x-large/6;xx-large/7',
113 fontSize_style: {
114 element: 'font',
115 attributes: { 'size': '#(size)' }
116 },
117
118 /*
119 * Font colors.
120 */
121
122 colorButton_foreStyle: {
123 element: 'font',
124 attributes: { 'color': '#(color)' }
125 },
126
127 colorButton_backStyle: {
128 element: 'font',
129 styles: { 'background-color': '#(color)' }
130 },
131
132 /*
133 * Styles combo.
134 */
135 stylesSet: [
136 { name: 'Computer Code', element: 'code' },
137 { name: 'Keyboard Phrase', element: 'kbd' },
138 { name: 'Sample Text', element: 'samp' },
139 { name: 'Variable', element: 'var' },
140 { name: 'Deleted Text', element: 'del' },
141 { name: 'Inserted Text', element: 'ins' },
142 { name: 'Cited Work', element: 'cite' },
143 { name: 'Inline Quotation', element: 'q' }
144 ],
145
146 on: {
147 pluginsLoaded: configureTransformations,
148 loaded: configureHtmlWriter
149 }
150 });
151
152 /*
153 * Add missing content transformations.
154 */
155 function configureTransformations( evt ) {
156 var editor = evt.editor;
157
158 editor.dataProcessor.htmlFilter.addRules( {
159 attributes: {
160 style: function( value, element ) {
161 // Return #RGB for background and border colors
162 return CKEDITOR.tools.convertRgbToHex( value );
163 }
164 }
165 } );
166
167 // Default automatic content transformations do not yet take care of
168 // align attributes on blocks, so we need to add our own transformation rules.
169 function alignToAttribute( element ) {
170 if ( element.styles[ 'text-align' ] ) {
171 element.attributes.align = element.styles[ 'text-align' ];
172 delete element.styles[ 'text-align' ];
173 }
174 }
175 editor.filter.addTransformations( [
176 [ { element: 'p', right: alignToAttribute } ],
177 [ { element: 'h1', right: alignToAttribute } ],
178 [ { element: 'h2', right: alignToAttribute } ],
179 [ { element: 'h3', right: alignToAttribute } ],
180 [ { element: 'pre', right: alignToAttribute } ]
181 ] );
182 }
183
184 /*
185 * Adjust the behavior of htmlWriter to make it output HTML like FCKeditor.
186 */
187 function configureHtmlWriter( evt ) {
188 var editor = evt.editor,
189 dataProcessor = editor.dataProcessor;
190
191 // Out self closing tags the HTML4 way, like <br>.
192 dataProcessor.writer.selfClosingEnd = '>';
193
194 // Make output formatting behave similar to FCKeditor.
195 var dtd = CKEDITOR.dtd;
196 for ( var e in CKEDITOR.tools.extend( {}, dtd.$nonBodyContent, dtd.$block, dtd.$listItem, dtd.$tableContent ) ) {
197 dataProcessor.writer.setRules( e, {
198 indent: true,
199 breakBeforeOpen: true,
200 breakAfterOpen: false,
201 breakBeforeClose: !dtd[ e ][ '#' ],
202 breakAfterClose: true
203 });
204 }
205 }
206
207 </script>
208 </p>
209 <p>
210 <input type="submit" value="Submit">
211 </p>
212 </form>
213 <div id="footer">
214 <hr>
215 <p>
216 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
217 </p>
218 <p id="copy">
219 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
220 Knabben. All rights reserved.
221 </p>
222 </div>
223</body>
224</html>
diff --git a/release/samples/old/index.html b/release/samples/old/index.html
new file mode 100644
index 0000000..f4f795b
--- /dev/null
+++ b/release/samples/old/index.html
@@ -0,0 +1,131 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>CKEditor Samples</title>
10 <link rel="stylesheet" href="sample.css">
11</head>
12<body>
13 <h1 class="samples">
14 CKEditor Samples
15 </h1>
16 <div class="warning deprecated">
17 These samples are not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
18 </div>
19 <div class="twoColumns">
20 <div class="twoColumnsLeft">
21 <h2 class="samples">
22 Basic Samples
23 </h2>
24 <dl class="samples">
25 <dt><a class="samples" href="replacebyclass.html">Replace textarea elements by class name</a></dt>
26 <dd>Automatic replacement of all textarea elements of a given class with a CKEditor instance.</dd>
27
28 <dt><a class="samples" href="replacebycode.html">Replace textarea elements by code</a></dt>
29 <dd>Replacement of textarea elements with CKEditor instances by using a JavaScript call.</dd>
30
31 <dt><a class="samples" href="jquery.html">Create editors with jQuery</a></dt>
32 <dd>Creating standard and inline CKEditor instances with jQuery adapter.</dd>
33 </dl>
34
35 <h2 class="samples">
36 Basic Customization
37 </h2>
38 <dl class="samples">
39 <dt><a class="samples" href="uicolor.html">User Interface color</a></dt>
40 <dd>Changing CKEditor User Interface color and adding a toolbar button that lets the user set the UI color.</dd>
41
42 <dt><a class="samples" href="uilanguages.html">User Interface languages</a></dt>
43 <dd>Changing CKEditor User Interface language and adding a drop-down list that lets the user choose the UI language.</dd>
44 </dl>
45
46
47 <h2 class="samples">Plugins</h2>
48<dl class="samples">
49<dt><a class="samples" href="magicline/magicline.html">Magicline plugin</a></dt>
50<dd>Using the Magicline plugin to access difficult focus spaces.</dd>
51
52<dt><a class="samples" href="wysiwygarea/fullpage.html">Full page support</a></dt>
53<dd>CKEditor inserted with a JavaScript call and used to edit the whole page from &lt;html&gt; to &lt;/html&gt;.</dd>
54</dl>
55 </div>
56 <div class="twoColumnsRight">
57 <h2 class="samples">
58 Inline Editing
59 </h2>
60 <dl class="samples">
61 <dt><a class="samples" href="inlineall.html">Massive inline editor creation</a></dt>
62 <dd>Turn all elements with <code>contentEditable = true</code> attribute into inline editors.</dd>
63
64 <dt><a class="samples" href="inlinebycode.html">Convert element into an inline editor by code</a></dt>
65 <dd>Conversion of DOM elements into inline CKEditor instances by using a JavaScript call.</dd>
66
67 <dt><a class="samples" href="inlinetextarea.html">Replace textarea with inline editor</a> <span class="new">New!</span></dt>
68 <dd>A form with a textarea that is replaced by an inline editor at runtime.</dd>
69
70
71 </dl>
72
73 <h2 class="samples">
74 Advanced Samples
75 </h2>
76 <dl class="samples">
77 <dt><a class="samples" href="datafiltering.html">Data filtering and features activation</a> <span class="new">New!</span></dt>
78 <dd>Data filtering and automatic features activation basing on configuration.</dd>
79
80 <dt><a class="samples" href="divreplace.html">Replace DIV elements on the fly</a></dt>
81 <dd>Transforming a <code>div</code> element into an instance of CKEditor with a mouse click.</dd>
82
83 <dt><a class="samples" href="appendto.html">Append editor instances</a></dt>
84 <dd>Appending editor instances to existing DOM elements.</dd>
85
86 <dt><a class="samples" href="ajax.html">Create and destroy editor instances for Ajax applications</a></dt>
87 <dd>Creating and destroying CKEditor instances on the fly and saving the contents entered into the editor window.</dd>
88
89 <dt><a class="samples" href="api.html">Basic usage of the API</a></dt>
90 <dd>Using the CKEditor JavaScript API to interact with the editor at runtime.</dd>
91
92 <dt><a class="samples" href="xhtmlstyle.html">XHTML-compliant style</a></dt>
93 <dd>Configuring CKEditor to produce XHTML 1.1 compliant attributes and styles.</dd>
94
95 <dt><a class="samples" href="readonly.html">Read-only mode</a></dt>
96 <dd>Using the readOnly API to block introducing changes to the editor contents.</dd>
97
98 <dt><a class="samples" href="tabindex.html">"Tab" key-based navigation</a></dt>
99 <dd>Navigating among editor instances with tab key.</dd>
100
101
102
103<dt><a class="samples" href="dialog/dialog.html">Using the JavaScript API to customize dialog windows</a></dt>
104<dd>Using the dialog windows API to customize dialog windows without changing the original editor code.</dd>
105
106<dt><a class="samples" href="enterkey/enterkey.html">Using the &quot;Enter&quot; key in CKEditor</a></dt>
107<dd>Configuring the behavior of <em>Enter</em> and <em>Shift+Enter</em> keys.</dd>
108
109<dt><a class="samples" href="htmlwriter/outputforflash.html">Output for Flash</a></dt>
110<dd>Configuring CKEditor to produce HTML code that can be used with Adobe Flash.</dd>
111
112<dt><a class="samples" href="htmlwriter/outputhtml.html">Output HTML</a></dt>
113<dd>Configuring CKEditor to produce legacy HTML 4 code.</dd>
114
115<dt><a class="samples" href="toolbar/toolbar.html">Toolbar Configurations</a></dt>
116<dd>Configuring CKEditor to display full or custom toolbar layout.</dd>
117
118 </dl>
119 </div>
120 </div>
121 <div id="footer">
122 <hr>
123 <p>
124 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
125 </p>
126 <p id="copy">
127 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico Knabben. All rights reserved.
128 </p>
129 </div>
130</body>
131</html>
diff --git a/release/samples/old/inlineall.html b/release/samples/old/inlineall.html
new file mode 100644
index 0000000..e0241e8
--- /dev/null
+++ b/release/samples/old/inlineall.html
@@ -0,0 +1,314 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Massive inline editing &mdash; CKEditor Sample</title>
10 <script src="../../ckeditor.js"></script>
11 <script>
12
13 // This code is generally not necessary, but it is here to demonstrate
14 // how to customize specific editor instances on the fly. This fits well
15 // this demo because we have editable elements (like headers) that
16 // require less features.
17
18 // The "instanceCreated" event is fired for every editor instance created.
19 CKEDITOR.on( 'instanceCreated', function( event ) {
20 var editor = event.editor,
21 element = editor.element;
22
23 // Customize editors for headers and tag list.
24 // These editors don't need features like smileys, templates, iframes etc.
25 if ( element.is( 'h1', 'h2', 'h3' ) || element.getAttribute( 'id' ) == 'taglist' ) {
26 // Customize the editor configurations on "configLoaded" event,
27 // which is fired after the configuration file loading and
28 // execution. This makes it possible to change the
29 // configurations before the editor initialization takes place.
30 editor.on( 'configLoaded', function() {
31
32 // Remove unnecessary plugins to make the editor simpler.
33 editor.config.removePlugins = 'colorbutton,find,flash,font,' +
34 'forms,iframe,image,newpage,removeformat,' +
35 'smiley,specialchar,stylescombo,templates';
36
37 // Rearrange the layout of the toolbar.
38 editor.config.toolbarGroups = [
39 { name: 'editing', groups: [ 'basicstyles', 'links' ] },
40 { name: 'undo' },
41 { name: 'clipboard', groups: [ 'selection', 'clipboard' ] },
42 { name: 'about' }
43 ];
44 });
45 }
46 });
47
48 </script>
49 <link href="sample.css" rel="stylesheet">
50 <style>
51
52 /* The following styles are just to make the page look nice. */
53
54 /* Workaround to show Arial Black in Firefox. */
55 @font-face
56 {
57 font-family: 'arial-black';
58 src: local('Arial Black');
59 }
60
61 *[contenteditable="true"]
62 {
63 padding: 10px;
64 }
65
66 #container
67 {
68 width: 960px;
69 margin: 30px auto 0;
70 }
71
72 #header
73 {
74 overflow: hidden;
75 padding: 0 0 30px;
76 border-bottom: 5px solid #05B2D2;
77 position: relative;
78 }
79
80 #headerLeft,
81 #headerRight
82 {
83 width: 49%;
84 overflow: hidden;
85 }
86
87 #headerLeft
88 {
89 float: left;
90 padding: 10px 1px 1px;
91 }
92
93 #headerLeft h2,
94 #headerLeft h3
95 {
96 text-align: right;
97 margin: 0;
98 overflow: hidden;
99 font-weight: normal;
100 }
101
102 #headerLeft h2
103 {
104 font-family: "Arial Black",arial-black;
105 font-size: 4.6em;
106 line-height: 1.1;
107 text-transform: uppercase;
108 }
109
110 #headerLeft h3
111 {
112 font-size: 2.3em;
113 line-height: 1.1;
114 margin: .2em 0 0;
115 color: #666;
116 }
117
118 #headerRight
119 {
120 float: right;
121 padding: 1px;
122 }
123
124 #headerRight p
125 {
126 line-height: 1.8;
127 text-align: justify;
128 margin: 0;
129 }
130
131 #headerRight p + p
132 {
133 margin-top: 20px;
134 }
135
136 #headerRight > div
137 {
138 padding: 20px;
139 margin: 0 0 0 30px;
140 font-size: 1.4em;
141 color: #666;
142 }
143
144 #columns
145 {
146 color: #333;
147 overflow: hidden;
148 padding: 20px 0;
149 }
150
151 #columns > div
152 {
153 float: left;
154 width: 33.3%;
155 }
156
157 #columns #column1 > div
158 {
159 margin-left: 1px;
160 }
161
162 #columns #column3 > div
163 {
164 margin-right: 1px;
165 }
166
167 #columns > div > div
168 {
169 margin: 0px 10px;
170 padding: 10px 20px;
171 }
172
173 #columns blockquote
174 {
175 margin-left: 15px;
176 }
177
178 #tagLine
179 {
180 border-top: 5px solid #05B2D2;
181 padding-top: 20px;
182 }
183
184 #taglist {
185 display: inline-block;
186 margin-left: 20px;
187 font-weight: bold;
188 margin: 0 0 0 20px;
189 }
190
191 </style>
192</head>
193<body>
194<div>
195 <h1 class="samples"><a href="index.html">CKEditor Samples</a> &raquo; Massive inline editing</h1>
196 <div class="warning deprecated">
197 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/inline.html">brand new version in CKEditor SDK</a>.
198 </div>
199 <div class="description">
200 <p>This sample page demonstrates the inline editing feature - CKEditor instances will be created automatically from page elements with <strong>contentEditable</strong> attribute set to value <strong>true</strong>:</p>
201 <pre class="samples">&lt;div <strong>contenteditable="true</strong>" &gt; ... &lt;/div&gt;</pre>
202 <p>Click inside of any element below to start editing.</p>
203 </div>
204</div>
205<div id="container">
206 <div id="header">
207 <div id="headerLeft">
208 <h2 id="sampleTitle" contenteditable="true">
209 CKEditor<br> Goes Inline!
210 </h2>
211 <h3 contenteditable="true">
212 Lorem ipsum dolor sit amet dolor duis blandit vestibulum faucibus a, tortor.
213 </h3>
214 </div>
215 <div id="headerRight">
216 <div contenteditable="true">
217 <p>
218 Lorem ipsum dolor sit amet enim. Etiam ullamcorper. Suspendisse a pellentesque dui, non felis. Maecenas malesuada elit lectus felis, malesuada ultricies.
219 </p>
220 <p>
221 Curabitur et ligula. Ut molestie a, ultricies porta urna. Vestibulum commodo volutpat a, convallis ac, laoreet enim. Phasellus fermentum in, dolor. Pellentesque facilisis. Nulla imperdiet sit amet magna. Vestibulum dapibus, mauris nec malesuada fames ac.
222 </p>
223 </div>
224 </div>
225 </div>
226 <div id="columns">
227 <div id="column1">
228 <div contenteditable="true">
229 <h3>
230 Fusce vitae porttitor
231 </h3>
232 <p>
233 <strong>
234 Lorem ipsum dolor sit amet dolor. Duis blandit vestibulum faucibus a, tortor.
235 </strong>
236 </p>
237 <p>
238 Proin nunc justo felis mollis tincidunt, risus risus pede, posuere cubilia Curae, Nullam euismod, enim. Etiam nibh ultricies dolor ac dignissim erat volutpat. Vivamus fermentum <a href="http://ckeditor.com/">nisl nulla sem in</a> metus. Maecenas wisi. Donec nec erat volutpat.
239 </p>
240 <blockquote>
241 <p>
242 Fusce vitae porttitor a, euismod convallis nisl, blandit risus tortor, pretium.
243 Vehicula vitae, imperdiet vel, ornare enim vel sodales rutrum
244 </p>
245 </blockquote>
246 <blockquote>
247 <p>
248 Libero nunc, rhoncus ante ipsum non ipsum. Nunc eleifend pede turpis id sollicitudin fringilla. Phasellus ultrices, velit ac arcu.
249 </p>
250 </blockquote>
251 <p>Pellentesque nunc. Donec suscipit erat. Pellentesque habitant morbi tristique ullamcorper.</p>
252 <p><s>Mauris mattis feugiat lectus nec mauris. Nullam vitae ante.</s></p>
253 </div>
254 </div>
255 <div id="column2">
256 <div contenteditable="true">
257 <h3>
258 Integer condimentum sit amet
259 </h3>
260 <p>
261 <strong>Aenean nonummy a, mattis varius. Cras aliquet.</strong>
262 Praesent <a href="http://ckeditor.com/">magna non mattis ac, rhoncus nunc</a>, rhoncus eget, cursus pulvinar mollis.</p>
263 <p>Proin id nibh. Sed eu libero posuere sed, lectus. Phasellus dui gravida gravida feugiat mattis ac, felis.</p>
264 <p>Integer condimentum sit amet, tempor elit odio, a dolor non ante at sapien. Sed ac lectus. Nulla ligula quis eleifend mi, id leo velit pede cursus arcu id nulla ac lectus. Phasellus vestibulum. Nunc viverra enim quis diam.</p>
265 </div>
266 <div contenteditable="true">
267 <h3>
268 Praesent wisi accumsan sit amet nibh
269 </h3>
270 <p>Donec ullamcorper, risus tortor, pretium porttitor. Morbi quam quis lectus non leo.</p>
271 <p style="margin-left: 40px; ">Integer faucibus scelerisque. Proin faucibus at, aliquet vulputate, odio at eros. Fusce <a href="http://ckeditor.com/">gravida, erat vitae augue</a>. Fusce urna fringilla gravida.</p>
272 <p>In hac habitasse platea dictumst. Praesent wisi accumsan sit amet nibh. Maecenas orci luctus a, lacinia quam sem, posuere commodo, odio condimentum tempor, pede semper risus. Suspendisse pede. In hac habitasse platea dictumst. Nam sed laoreet sit amet erat. Integer.</p>
273 </div>
274 </div>
275 <div id="column3">
276 <div contenteditable="true">
277 <p>
278 <img src="assets/inlineall/logo.png" alt="CKEditor logo" style="float:left">
279 </p>
280 <p>Quisque justo neque, mattis sed, fermentum ultrices <strong>posuere cubilia Curae</strong>, Vestibulum elit metus, quis placerat ut, lectus. Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis. Fusce porttitor, nulla quis turpis. Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi. Donec odio nec velit ac nunc sit amet, accumsan cursus aliquet. Vestibulum ante sit amet sagittis mi.</p>
281 <h3>
282 Nullam laoreet vel consectetuer tellus suscipit
283 </h3>
284 <ul>
285 <li>Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis.</li>
286 <li>Fusce porttitor, nulla quis turpis. Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi.</li>
287 <li>Mauris eget tellus. Donec non felis. Nam eget dolor. Vestibulum enim. Donec.</li>
288 </ul>
289 <p>Quisque justo neque, mattis sed, <a href="http://ckeditor.com/">fermentum ultrices posuere cubilia</a> Curae, Vestibulum elit metus, quis placerat ut, lectus.</p>
290 <p>Nullam laoreet vel, consectetuer tellus suscipit ultricies, hendrerit wisi. Ut sagittis, nunc libero, egestas consequat lobortis velit rutrum ut, faucibus turpis. Fusce porttitor, nulla quis turpis.</p>
291 <p>Donec odio nec velit ac nunc sit amet, accumsan cursus aliquet. Vestibulum ante sit amet sagittis mi. Sed in nonummy faucibus turpis. Mauris eget tellus. Donec non felis. Nam eget dolor. Vestibulum enim. Donec.</p>
292 </div>
293 </div>
294 </div>
295 <div id="tagLine">
296 Tags of this article:
297 <p id="taglist" contenteditable="true">
298 inline, editing, floating, CKEditor
299 </p>
300 </div>
301</div>
302<div id="footer">
303 <hr>
304 <p>
305 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
306 http://ckeditor.com</a>
307 </p>
308 <p id="copy">
309 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a>
310 - Frederico Knabben. All rights reserved.
311 </p>
312</div>
313</body>
314</html>
diff --git a/release/samples/old/inlinebycode.html b/release/samples/old/inlinebycode.html
new file mode 100644
index 0000000..339be0c
--- /dev/null
+++ b/release/samples/old/inlinebycode.html
@@ -0,0 +1,124 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Inline Editing by Code &mdash; CKEditor Sample</title>
10 <script src="../../ckeditor.js"></script>
11 <link href="sample.css" rel="stylesheet">
12 <style>
13
14 #editable
15 {
16 padding: 10px;
17 float: left;
18 }
19
20 </style>
21</head>
22<body>
23 <h1 class="samples">
24 <a href="index.html">CKEditor Samples</a> &raquo; Inline Editing by Code
25 </h1>
26 <div class="warning deprecated">
27 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/inline.html">brand new version in CKEditor SDK</a>.
28 </div>
29 <div class="description">
30 <p>
31 This sample shows how to create an inline editor instance of CKEditor. It is created
32 with a JavaScript call using the following code:
33 </p>
34<pre class="samples">
35// This property tells CKEditor to not activate every element with contenteditable=true element.
36CKEDITOR.disableAutoInline = true;
37
38var editor = CKEDITOR.inline( document.getElementById( 'editable' ) );
39</pre>
40 <p>
41 Note that <code>editable</code> in the code above is the <code>id</code>
42 attribute of the <code>&lt;div&gt;</code> element to be converted into an inline instance.
43 </p>
44 </div>
45 <div id="editable" contenteditable="true">
46 <h1><img alt="Saturn V carrying Apollo 11" class="right" src="assets/sample.jpg" /> Apollo 11</h1>
47
48 <p><b>Apollo 11</b> was the spaceflight that landed the first humans, Americans <a href="http://en.wikipedia.org/wiki/Neil_Armstrong" title="Neil Armstrong">Neil Armstrong</a> and <a href="http://en.wikipedia.org/wiki/Buzz_Aldrin" title="Buzz Aldrin">Buzz Aldrin</a>, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.</p>
49
50 <p>Armstrong spent about <s>three and a half</s> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&nbsp;kg) of lunar material for return to Earth. A third member of the mission, <a href="http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)" title="Michael Collins (astronaut)">Michael Collins</a>, piloted the <a href="http://en.wikipedia.org/wiki/Apollo_Command/Service_Module" title="Apollo Command/Service Module">command</a> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.</p>
51
52 <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2>
53
54 <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p>
55
56 <blockquote>
57 <p>One small step for [a] man, one giant leap for mankind.</p>
58 </blockquote>
59
60 <p>Apollo 11 effectively ended the <a href="http://en.wikipedia.org/wiki/Space_Race" title="Space Race">Space Race</a> and fulfilled a national goal proposed in 1961 by the late U.S. President <a href="http://en.wikipedia.org/wiki/John_F._Kennedy" title="John F. Kennedy">John F. Kennedy</a> in a speech before the United States Congress:</p>
61
62 <blockquote>
63 <p>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.</p>
64 </blockquote>
65
66 <h2>Technical details <a id="tech-details" name="tech-details"></a></h2>
67
68 <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;">
69 <caption><strong>Mission crew</strong></caption>
70 <thead>
71 <tr>
72 <th scope="col">Position</th>
73 <th scope="col">Astronaut</th>
74 </tr>
75 </thead>
76 <tbody>
77 <tr>
78 <td>Commander</td>
79 <td>Neil A. Armstrong</td>
80 </tr>
81 <tr>
82 <td>Command Module Pilot</td>
83 <td>Michael Collins</td>
84 </tr>
85 <tr>
86 <td>Lunar Module Pilot</td>
87 <td>Edwin &quot;Buzz&quot; E. Aldrin, Jr.</td>
88 </tr>
89 </tbody>
90 </table>
91
92 <p>Launched by a <strong>Saturn V</strong> rocket from <a href="http://en.wikipedia.org/wiki/Kennedy_Space_Center" title="Kennedy Space Center">Kennedy Space Center</a> in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of <a href="http://en.wikipedia.org/wiki/NASA" title="NASA">NASA</a>&#39;s Apollo program. The Apollo spacecraft had three parts:</p>
93
94 <ol>
95 <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li>
96 <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li>
97 <li><strong>Lunar Module</strong> for landing on the Moon.</li>
98 </ol>
99
100 <p>After being sent to the Moon by the Saturn V&#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the <a href="http://en.wikipedia.org/wiki/Mare_Tranquillitatis" title="Mare Tranquillitatis">Sea of Tranquility</a>. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the <a href="http://en.wikipedia.org/wiki/Pacific_Ocean" title="Pacific Ocean">Pacific Ocean</a> on July 24.</p>
101
102 <hr />
103 <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p>
104 </div>
105
106 <script>
107 // We need to turn off the automatic editor creation first.
108 CKEDITOR.disableAutoInline = true;
109
110 var editor = CKEDITOR.inline( 'editable' );
111 </script>
112 <div id="footer">
113 <hr>
114 <p contenteditable="true">
115 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
116 http://ckeditor.com</a>
117 </p>
118 <p id="copy">
119 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a>
120 - Frederico Knabben. All rights reserved.
121 </p>
122 </div>
123</body>
124</html>
diff --git a/release/samples/old/inlinetextarea.html b/release/samples/old/inlinetextarea.html
new file mode 100644
index 0000000..504d181
--- /dev/null
+++ b/release/samples/old/inlinetextarea.html
@@ -0,0 +1,113 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Replace Textarea with Inline Editor &mdash; CKEditor Sample</title>
10 <script src="../../ckeditor.js"></script>
11 <link href="sample.css" rel="stylesheet">
12 <style>
13
14 /* Style the CKEditor element to look like a textfield */
15 .cke_textarea_inline
16 {
17 padding: 10px;
18 height: 200px;
19 overflow: auto;
20
21 border: 1px solid gray;
22 -webkit-appearance: textfield;
23 }
24
25 </style>
26</head>
27<body>
28 <h1 class="samples">
29 <a href="index.html">CKEditor Samples</a> &raquo; Replace Textarea with Inline Editor
30 </h1>
31 <div class="warning deprecated">
32 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/inline.html">brand new version in CKEditor SDK</a>.
33 </div>
34 <div class="description">
35 <p>
36 You can also create an inline editor from a <code>textarea</code>
37 element. In this case the <code>textarea</code> will be replaced
38 by a <code>div</code> element with inline editing enabled.
39 </p>
40<pre class="samples">
41// "article-body" is the name of a textarea element.
42var editor = CKEDITOR.inline( 'article-body' );
43</pre>
44 </div>
45 <form action="sample_posteddata.php" method="post">
46 <h2>This is a sample form with some fields</h2>
47 <p>
48 Title:<br>
49 <input type="text" name="title" value="Sample Form"></p>
50 <p>
51 Article Body (Textarea converted to CKEditor):<br>
52 <textarea name="article-body" style="height: 200px">
53 &lt;h2&gt;Technical details &lt;a id="tech-details" name="tech-details"&gt;&lt;/a&gt;&lt;/h2&gt;
54
55 &lt;table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;"&gt;
56 &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt;
57 &lt;thead&gt;
58 &lt;tr&gt;
59 &lt;th scope="col"&gt;Position&lt;/th&gt;
60 &lt;th scope="col"&gt;Astronaut&lt;/th&gt;
61 &lt;/tr&gt;
62 &lt;/thead&gt;
63 &lt;tbody&gt;
64 &lt;tr&gt;
65 &lt;td&gt;Commander&lt;/td&gt;
66 &lt;td&gt;Neil A. Armstrong&lt;/td&gt;
67 &lt;/tr&gt;
68 &lt;tr&gt;
69 &lt;td&gt;Command Module Pilot&lt;/td&gt;
70 &lt;td&gt;Michael Collins&lt;/td&gt;
71 &lt;/tr&gt;
72 &lt;tr&gt;
73 &lt;td&gt;Lunar Module Pilot&lt;/td&gt;
74 &lt;td&gt;Edwin &quot;Buzz&quot; E. Aldrin, Jr.&lt;/td&gt;
75 &lt;/tr&gt;
76 &lt;/tbody&gt;
77 &lt;/table&gt;
78
79 &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href="http://en.wikipedia.org/wiki/Kennedy_Space_Center" title="Kennedy Space Center"&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href="http://en.wikipedia.org/wiki/NASA" title="NASA"&gt;NASA&lt;/a&gt;&#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt;
80
81 &lt;ol&gt;
82 &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt;
83 &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt;
84 &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt;
85 &lt;/ol&gt;
86
87 &lt;p&gt;After being sent to the Moon by the Saturn V&#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href="http://en.wikipedia.org/wiki/Mare_Tranquillitatis" title="Mare Tranquillitatis"&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href="http://en.wikipedia.org/wiki/Pacific_Ocean" title="Pacific Ocean"&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt;
88
89 &lt;hr /&gt;
90 &lt;p style="text-align: right;"&gt;&lt;small&gt;Source: &lt;a href="http://en.wikipedia.org/wiki/Apollo_11"&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
91 </textarea>
92 </p>
93 <p>
94 <input type="submit" value="Submit">
95 </p>
96 </form>
97
98 <script>
99 CKEDITOR.inline( 'article-body' );
100 </script>
101 <div id="footer">
102 <hr>
103 <p>
104 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">
105 http://ckeditor.com</a>
106 </p>
107 <p id="copy">
108 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a>
109 - Frederico Knabben. All rights reserved.
110 </p>
111 </div>
112</body>
113</html>
diff --git a/release/samples/old/jquery.html b/release/samples/old/jquery.html
new file mode 100644
index 0000000..95e43ea
--- /dev/null
+++ b/release/samples/old/jquery.html
@@ -0,0 +1,103 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>jQuery Adapter &mdash; CKEditor Sample</title>
10 <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
11 <script src="../../ckeditor.js"></script>
12 <script src="../../adapters/jquery.js"></script>
13 <link href="sample.css" rel="stylesheet">
14 <style>
15
16 #editable
17 {
18 padding: 10px;
19 float: left;
20 }
21
22 </style>
23 <script>
24
25 CKEDITOR.disableAutoInline = true;
26
27 $( document ).ready( function() {
28 $( '#editor1' ).ckeditor(); // Use CKEDITOR.replace() if element is <textarea>.
29 $( '#editable' ).ckeditor(); // Use CKEDITOR.inline().
30 } );
31
32 function setValue() {
33 $( '#editor1' ).val( $( 'input#val' ).val() );
34 }
35
36 </script>
37</head>
38<body>
39 <h1 class="samples">
40 <a href="index.html" id="a-test">CKEditor Samples</a> &raquo; Create Editors with jQuery
41 </h1>
42 <div class="warning deprecated">
43 This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
44 </div>
45 <form action="sample_posteddata.php" method="post">
46 <div class="description">
47 <p>
48 This sample shows how to use the <a href="http://docs.ckeditor.com/#!/guide/dev_jquery">jQuery adapter</a>.
49 Note that you have to include both CKEditor and jQuery scripts before including the adapter.
50 </p>
51
52<pre class="samples">
53&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
54&lt;script src="/ckedit../../ckeditor.js"&gt;&lt;/script&gt;
55&lt;script src="/ckeditor/adapters/jquery.js"&gt;&lt;/script&gt;
56</pre>
57
58 <p>Then you can replace HTML elements with a CKEditor instance using the <code>ckeditor()</code> method.</p>
59
60<pre class="samples">
61$( document ).ready( function() {
62 $( 'textarea#editor1' ).ckeditor();
63} );
64</pre>
65 </div>
66
67 <h2 class="samples">Inline Example</h2>
68
69 <div id="editable" contenteditable="true">
70 <p><img alt="Saturn V carrying Apollo 11" class="right" src="assets/sample.jpg"/><b>Apollo 11</b> was the spaceflight that landed the first humans, Americans <a href="http://en.wikipedia.org/wiki/Neil_Armstrong" title="Neil Armstrong">Neil Armstrong</a> and <a href="http://en.wikipedia.org/wiki/Buzz_Aldrin" title="Buzz Aldrin">Buzz Aldrin</a>, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.</p>
71 <p>Armstrong spent about <s>three and a half</s> two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&nbsp;kg) of lunar material for return to Earth. A third member of the mission, <a href="http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)" title="Michael Collins (astronaut)">Michael Collins</a>, piloted the <a href="http://en.wikipedia.org/wiki/Apollo_Command/Service_Module" title="Apollo Command/Service Module">command</a> spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.
72 <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p>
73 <blockquote><p>One small step for [a] man, one giant leap for mankind.</p></blockquote> <p>Apollo 11 effectively ended the <a href="http://en.wikipedia.org/wiki/Space_Race" title="Space Race">Space Race</a> and fulfilled a national goal proposed in 1961 by the late U.S. President <a href="http://en.wikipedia.org/wiki/John_F._Kennedy" title="John F. Kennedy">John F. Kennedy</a> in a speech before the United States Congress:</p> <blockquote><p>[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.</p></blockquote>
74 </div>
75
76 <br style="clear: both">
77
78 <h2 class="samples">Classic (iframe-based) Example</h2>
79
80 <textarea cols="80" id="editor1" name="editor1" rows="10">
81 &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
82 </textarea>
83
84 <p style="overflow: hidden">
85 <input style="float: left" type="submit" value="Submit">
86 <span style="float: right">
87 <input type="text" id="val" value="I'm using jQuery val()!" size="30">
88 <input onclick="setValue();" type="button" value="Set value">
89 </span>
90 </p>
91 </form>
92 <div id="footer">
93 <hr>
94 <p>
95 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
96 </p>
97 <p id="copy">
98 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
99 Knabben. All rights reserved.
100 </p>
101 </div>
102</body>
103</html>
diff --git a/release/samples/old/magicline/magicline.html b/release/samples/old/magicline/magicline.html
new file mode 100644
index 0000000..8fff40e
--- /dev/null
+++ b/release/samples/old/magicline/magicline.html
@@ -0,0 +1,209 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Using Magicline plugin &mdash; CKEditor Sample</title>
10 <script src="../../../ckeditor.js"></script>
11 <link rel="stylesheet" href="../../../samples/old/sample.css">
12 <meta name="ckeditor-sample-name" content="Magicline plugin">
13 <meta name="ckeditor-sample-group" content="Plugins">
14 <meta name="ckeditor-sample-description" content="Using the Magicline plugin to access difficult focus spaces.">
15</head>
16<body>
17 <h1 class="samples">
18 <a href="../../../samples/old/index.html">CKEditor Samples</a> &raquo; Using Magicline plugin
19 </h1>
20 <div class="warning deprecated">
21 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/magicline.html">brand new version in CKEditor SDK</a>.
22 </div>
23 <div class="description">
24 <p>
25 This sample shows the advantages of <strong>Magicline</strong> plugin
26 which is to enhance the editing process. Thanks to this plugin,
27 a number of difficult focus spaces which are inaccessible due to
28 browser issues can now be focused.
29 </p>
30 <p>
31 <strong>Magicline</strong> plugin shows a red line with a handler
32 which, when clicked, inserts a paragraph and allows typing. To see this,
33 focus an editor and move your mouse above the focus space you want
34 to access. The plugin is enabled by default so no additional
35 configuration is necessary.
36 </p>
37 </div>
38 <div>
39 <label for="editor1">
40 Editor 1:
41 </label>
42 <div class="description">
43 <p>
44 This editor uses a default <strong>Magicline</strong> setup.
45 </p>
46 </div>
47 <textarea cols="80" id="editor1" name="editor1" rows="10">
48 &lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;width: 100%; &quot;&gt;
49 &lt;tbody&gt;
50 &lt;tr&gt;
51 &lt;td&gt;This table&lt;/td&gt;
52 &lt;td&gt;is the&lt;/td&gt;
53 &lt;td&gt;very first&lt;/td&gt;
54 &lt;td&gt;element of the document.&lt;/td&gt;
55 &lt;/tr&gt;
56 &lt;tr&gt;
57 &lt;td&gt;We are still&lt;/td&gt;
58 &lt;td&gt;able to acces&lt;/td&gt;
59 &lt;td&gt;the space before it.&lt;/td&gt;
60 &lt;td&gt;
61 &lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;width: 100%; &quot;&gt;
62 &lt;tbody&gt;
63 &lt;tr&gt;
64 &lt;td&gt;This table is inside of a cell of another table.&lt;/td&gt;
65 &lt;/tr&gt;
66 &lt;tr&gt;
67 &lt;td&gt;We can type&amp;nbsp;either before or after it though.&lt;/td&gt;
68 &lt;/tr&gt;
69 &lt;/tbody&gt;
70 &lt;/table&gt;
71 &lt;/td&gt;
72 &lt;/tr&gt;
73 &lt;/tbody&gt;
74 &lt;/table&gt;
75
76 &lt;p&gt;Two succesive horizontal lines (&lt;tt&gt;HR&lt;/tt&gt; tags). We can access the space in between:&lt;/p&gt;
77
78 &lt;hr /&gt;
79 &lt;hr /&gt;
80 &lt;ol&gt;
81 &lt;li&gt;This numbered list...&lt;/li&gt;
82 &lt;li&gt;...is a neighbour of a horizontal line...&lt;/li&gt;
83 &lt;li&gt;...and another list.&lt;/li&gt;
84 &lt;/ol&gt;
85
86 &lt;ul&gt;
87 &lt;li&gt;We can type between the lists...&lt;/li&gt;
88 &lt;li&gt;...thanks to &lt;strong&gt;Magicline&lt;/strong&gt;.&lt;/li&gt;
89 &lt;/ul&gt;
90
91 &lt;p&gt;Lorem ipsum dolor sit amet dui. Morbi vel turpis. Nullam et leo. Etiam rutrum, urna tellus dui vel tincidunt mattis egestas, justo fringilla vel, massa. Phasellus.&lt;/p&gt;
92
93 &lt;p&gt;Quisque iaculis, dui lectus varius vitae, tortor. Proin lacus. Pellentesque ac lacus. Aenean nonummy commodo nec, pede. Etiam blandit risus elit.&lt;/p&gt;
94
95 &lt;p&gt;Ut pretium. Vestibulum rutrum in, adipiscing elit. Sed in quam in purus sem vitae pede. Pellentesque bibendum, urna sem vel risus. Vivamus posuere metus. Aliquam gravida iaculis nisl. Nam enim. Aliquam erat ac lacus tellus ac felis.&lt;/p&gt;
96
97 &lt;div style=&quot;border: 2px dashed green; background: #ddd; text-align: center;&quot;&gt;
98 &lt;p&gt;This text is wrapped in a&amp;nbsp;&lt;tt&gt;DIV&lt;/tt&gt;&amp;nbsp;element. We can type after this element though.&lt;/p&gt;
99 &lt;/div&gt;
100 </textarea>
101 <script>
102
103 // This call can be placed at any point after the
104 // <textarea>, or inside a <head><script> in a
105 // window.onload event handler.
106
107 CKEDITOR.replace( 'editor1', {
108 extraPlugins: 'magicline', // Ensure that magicline plugin, which is required for this sample, is loaded.
109 allowedContent: true // Switch off the ACF, so very complex content created to
110 // show magicline's power isn't filtered.
111 } );
112
113 </script>
114 </div>
115 <br>
116 <div>
117 <label for="editor2">
118 Editor 2:
119 </label>
120 <div class="description">
121 <p>
122 This editor is using a blue line.
123 </p>
124<pre class="samples">
125CKEDITOR.replace( 'editor2', {
126 magicline_color: 'blue'
127});</pre>
128 </div>
129 <textarea cols="80" id="editor2" name="editor2" rows="10">
130 &lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;width: 100%; &quot;&gt;
131 &lt;tbody&gt;
132 &lt;tr&gt;
133 &lt;td&gt;This table&lt;/td&gt;
134 &lt;td&gt;is the&lt;/td&gt;
135 &lt;td&gt;very first&lt;/td&gt;
136 &lt;td&gt;element of the document.&lt;/td&gt;
137 &lt;/tr&gt;
138 &lt;tr&gt;
139 &lt;td&gt;We are still&lt;/td&gt;
140 &lt;td&gt;able to acces&lt;/td&gt;
141 &lt;td&gt;the space before it.&lt;/td&gt;
142 &lt;td&gt;
143 &lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;width: 100%; &quot;&gt;
144 &lt;tbody&gt;
145 &lt;tr&gt;
146 &lt;td&gt;This table is inside of a cell of another table.&lt;/td&gt;
147 &lt;/tr&gt;
148 &lt;tr&gt;
149 &lt;td&gt;We can type&amp;nbsp;either before or after it though.&lt;/td&gt;
150 &lt;/tr&gt;
151 &lt;/tbody&gt;
152 &lt;/table&gt;
153 &lt;/td&gt;
154 &lt;/tr&gt;
155 &lt;/tbody&gt;
156 &lt;/table&gt;
157
158 &lt;p&gt;Two succesive horizontal lines (&lt;tt&gt;HR&lt;/tt&gt; tags). We can access the space in between:&lt;/p&gt;
159
160 &lt;hr /&gt;
161 &lt;hr /&gt;
162 &lt;ol&gt;
163 &lt;li&gt;This numbered list...&lt;/li&gt;
164 &lt;li&gt;...is a neighbour of a horizontal line...&lt;/li&gt;
165 &lt;li&gt;...and another list.&lt;/li&gt;
166 &lt;/ol&gt;
167
168 &lt;ul&gt;
169 &lt;li&gt;We can type between the lists...&lt;/li&gt;
170 &lt;li&gt;...thanks to &lt;strong&gt;Magicline&lt;/strong&gt;.&lt;/li&gt;
171 &lt;/ul&gt;
172
173 &lt;p&gt;Lorem ipsum dolor sit amet dui. Morbi vel turpis. Nullam et leo. Etiam rutrum, urna tellus dui vel tincidunt mattis egestas, justo fringilla vel, massa. Phasellus.&lt;/p&gt;
174
175 &lt;p&gt;Quisque iaculis, dui lectus varius vitae, tortor. Proin lacus. Pellentesque ac lacus. Aenean nonummy commodo nec, pede. Etiam blandit risus elit.&lt;/p&gt;
176
177 &lt;p&gt;Ut pretium. Vestibulum rutrum in, adipiscing elit. Sed in quam in purus sem vitae pede. Pellentesque bibendum, urna sem vel risus. Vivamus posuere metus. Aliquam gravida iaculis nisl. Nam enim. Aliquam erat ac lacus tellus ac felis.&lt;/p&gt;
178
179 &lt;div style=&quot;border: 2px dashed green; background: #ddd; text-align: center;&quot;&gt;
180 &lt;p&gt;This text is wrapped in a&amp;nbsp;&lt;tt&gt;DIV&lt;/tt&gt;&amp;nbsp;element. We can type after this element though.&lt;/p&gt;
181 &lt;/div&gt;
182 </textarea>
183 <script>
184
185 // This call can be placed at any point after the
186 // <textarea>, or inside a <head><script> in a
187 // window.onload event handler.
188
189 CKEDITOR.replace( 'editor2', {
190 extraPlugins: 'magicline', // Ensure that magicline plugin, which is required for this sample, is loaded.
191 magicline_color: 'blue', // Blue line
192 allowedContent: true // Switch off the ACF, so very complex content created to
193 // show magicline's power isn't filtered.
194 });
195
196 </script>
197 </div>
198 <div id="footer">
199 <hr>
200 <p>
201 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
202 </p>
203 <p id="copy">
204 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
205 Knabben. All rights reserved.
206 </p>
207 </div>
208</body>
209</html>
diff --git a/release/samples/old/readonly.html b/release/samples/old/readonly.html
new file mode 100644
index 0000000..edd1118
--- /dev/null
+++ b/release/samples/old/readonly.html
@@ -0,0 +1,76 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Using the CKEditor Read-Only API &mdash; CKEditor Sample</title>
10 <script src="../../ckeditor.js"></script>
11 <link rel="stylesheet" href="sample.css">
12 <script>
13
14 var editor;
15
16 // The instanceReady event is fired, when an instance of CKEditor has finished
17 // its initialization.
18 CKEDITOR.on( 'instanceReady', function( ev ) {
19 editor = ev.editor;
20
21 // Show this "on" button.
22 document.getElementById( 'readOnlyOn' ).style.display = '';
23
24 // Event fired when the readOnly property changes.
25 editor.on( 'readOnly', function() {
26 document.getElementById( 'readOnlyOn' ).style.display = this.readOnly ? 'none' : '';
27 document.getElementById( 'readOnlyOff' ).style.display = this.readOnly ? '' : 'none';
28 });
29 });
30
31 function toggleReadOnly( isReadOnly ) {
32 // Change the read-only state of the editor.
33 // http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setReadOnly
34 editor.setReadOnly( isReadOnly );
35 }
36
37 </script>
38</head>
39<body>
40 <h1 class="samples">
41 <a href="index.html">CKEditor Samples</a> &raquo; Using the CKEditor Read-Only API
42 </h1>
43 <div class="warning deprecated">
44 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/readonly.html">brand new version in CKEditor SDK</a>.
45 </div>
46 <div class="description">
47 <p>
48 This sample shows how to use the
49 <code><a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-setReadOnly">setReadOnly</a></code>
50 API to put editor into the read-only state that makes it impossible for users to change the editor contents.
51 </p>
52 <p>
53 For details on how to create this setup check the source code of this sample page.
54 </p>
55 </div>
56 <form action="sample_posteddata.php" method="post">
57 <p>
58 <textarea class="ckeditor" id="editor1" name="editor1" cols="100" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
59 </p>
60 <p>
61 <input id="readOnlyOn" onclick="toggleReadOnly();" type="button" value="Make it read-only" style="display:none">
62 <input id="readOnlyOff" onclick="toggleReadOnly( false );" type="button" value="Make it editable again" style="display:none">
63 </p>
64 </form>
65 <div id="footer">
66 <hr>
67 <p>
68 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
69 </p>
70 <p id="copy">
71 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
72 Knabben. All rights reserved.
73 </p>
74 </div>
75</body>
76</html>
diff --git a/release/samples/old/replacebyclass.html b/release/samples/old/replacebyclass.html
new file mode 100644
index 0000000..2edbf49
--- /dev/null
+++ b/release/samples/old/replacebyclass.html
@@ -0,0 +1,60 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Replace Textareas by Class Name &mdash; CKEditor Sample</title>
10 <script src="../../ckeditor.js"></script>
11 <link rel="stylesheet" href="sample.css">
12</head>
13<body>
14 <h1 class="samples">
15 <a href="index.html">CKEditor Samples</a> &raquo; Replace Textarea Elements by Class Name
16 </h1>
17 <div class="warning deprecated">
18 This sample is not maintained anymore. Check out the <a href="http://sdk.ckeditor.com/">brand new samples in CKEditor SDK</a>.
19 </div>
20 <div class="description">
21 <p>
22 This sample shows how to automatically replace all <code>&lt;textarea&gt;</code> elements
23 of a given class with a CKEditor instance.
24 </p>
25 <p>
26 To replace a <code>&lt;textarea&gt;</code> element, simply assign it the <code>ckeditor</code>
27 class, as in the code below:
28 </p>
29<pre class="samples">
30&lt;textarea <strong>class="ckeditor</strong>" name="editor1"&gt;&lt;/textarea&gt;
31</pre>
32 <p>
33 Note that other <code>&lt;textarea&gt;</code> attributes (like <code>id</code> or <code>name</code>) need to be adjusted to your document.
34 </p>
35 </div>
36 <form action="sample_posteddata.php" method="post">
37 <p>
38 <label for="editor1">
39 Editor 1:
40 </label>
41 <textarea class="ckeditor" cols="80" id="editor1" name="editor1" rows="10">
42 &lt;h1&gt;&lt;img alt=&quot;Saturn V carrying Apollo 11&quot; class=&quot;right&quot; src=&quot;assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
43 </textarea>
44 </p>
45 <p>
46 <input type="submit" value="Submit">
47 </p>
48 </form>
49 <div id="footer">
50 <hr>
51 <p>
52 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
53 </p>
54 <p id="copy">
55 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
56 Knabben. All rights reserved.
57 </p>
58 </div>
59</body>
60</html>
diff --git a/release/samples/old/replacebycode.html b/release/samples/old/replacebycode.html
new file mode 100644
index 0000000..36ace8b
--- /dev/null
+++ b/release/samples/old/replacebycode.html
@@ -0,0 +1,59 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Replace Textarea by Code &mdash; CKEditor Sample</title>
10 <script src="../../ckeditor.js"></script>
11 <link href="sample.css" rel="stylesheet">
12</head>
13<body>
14 <h1 class="samples">
15 <a href="index.html">CKEditor Samples</a> &raquo; Replace Textarea Elements Using JavaScript Code
16 </h1>
17 <div class="warning deprecated">
18 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/classic.html">brand new version in CKEditor SDK</a>.
19 </div>
20 <form action="sample_posteddata.php" method="post">
21 <div class="description">
22 <p>
23 This editor is using an <code>&lt;iframe&gt;</code> element-based editing area, provided by the <strong>Wysiwygarea</strong> plugin.
24 </p>
25<pre class="samples">
26CKEDITOR.replace( '<em>textarea_id</em>' )
27</pre>
28 </div>
29 <textarea cols="80" id="editor1" name="editor1" rows="10">
30 &lt;h1&gt;&lt;img alt=&quot;Saturn V carrying Apollo 11&quot; class=&quot;right&quot; src=&quot;assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
31 </textarea>
32 <script>
33
34 // This call can be placed at any point after the
35 // <textarea>, or inside a <head><script> in a
36 // window.onload event handler.
37
38 // Replace the <textarea id="editor"> with an CKEditor
39 // instance, using default configurations.
40
41 CKEDITOR.replace( 'editor1' );
42
43 </script>
44 <p>
45 <input type="submit" value="Submit">
46 </p>
47 </form>
48 <div id="footer">
49 <hr>
50 <p>
51 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
52 </p>
53 <p id="copy">
54 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
55 Knabben. All rights reserved.
56 </p>
57 </div>
58</body>
59</html>
diff --git a/release/samples/old/sample.css b/release/samples/old/sample.css
new file mode 100644
index 0000000..af866fe
--- /dev/null
+++ b/release/samples/old/sample.css
@@ -0,0 +1,357 @@
1/*
2Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3For licensing, see LICENSE.md or http://ckeditor.com/license
4*/
5
6html, body, h1, h2, h3, h4, h5, h6, div, span, blockquote, p, address, form, fieldset, img, ul, ol, dl, dt, dd, li, hr, table, td, th, strong, em, sup, sub, dfn, ins, del, q, cite, var, samp, code, kbd, tt, pre
7{
8 line-height: 1.5;
9}
10
11body
12{
13 padding: 10px 30px;
14}
15
16input, textarea, select, option, optgroup, button, td, th
17{
18 font-size: 100%;
19}
20
21pre
22{
23 -moz-tab-size: 4;
24 tab-size: 4;
25}
26
27pre, code, kbd, samp, tt
28{
29 font-family: monospace,monospace;
30 font-size: 1em;
31}
32
33body {
34 width: 960px;
35 margin: 0 auto;
36}
37
38code
39{
40 background: #f3f3f3;
41 border: 1px solid #ddd;
42 padding: 1px 4px;
43 border-radius: 3px;
44}
45
46abbr
47{
48 border-bottom: 1px dotted #555;
49 cursor: pointer;
50}
51
52.new, .beta
53{
54 text-transform: uppercase;
55 font-size: 10px;
56 font-weight: bold;
57 padding: 1px 4px;
58 margin: 0 0 0 5px;
59 color: #fff;
60 float: right;
61 border-radius: 3px;
62}
63
64.new
65{
66 background: #FF7E00;
67 border: 1px solid #DA8028;
68 text-shadow: 0 1px 0 #C97626;
69
70 box-shadow: 0 2px 3px 0 #FFA54E inset;
71}
72
73.beta
74{
75 background: #18C0DF;
76 border: 1px solid #19AAD8;
77 text-shadow: 0 1px 0 #048CAD;
78 font-style: italic;
79
80 box-shadow: 0 2px 3px 0 #50D4FD inset;
81}
82
83h1.samples
84{
85 color: #0782C1;
86 font-size: 200%;
87 font-weight: normal;
88 margin: 0;
89 padding: 0;
90}
91
92h1.samples a
93{
94 color: #0782C1;
95 text-decoration: none;
96 border-bottom: 1px dotted #0782C1;
97}
98
99.samples a:hover
100{
101 border-bottom: 1px dotted #0782C1;
102}
103
104h2.samples
105{
106 color: #000000;
107 font-size: 130%;
108 margin: 15px 0 0 0;
109 padding: 0;
110}
111
112p, blockquote, address, form, pre, dl, h1.samples, h2.samples
113{
114 margin-bottom: 15px;
115}
116
117ul.samples
118{
119 margin-bottom: 15px;
120}
121
122.clear
123{
124 clear: both;
125}
126
127fieldset
128{
129 margin: 0;
130 padding: 10px;
131}
132
133body, input, textarea
134{
135 color: #333333;
136 font-family: Arial, Helvetica, sans-serif;
137}
138
139body
140{
141 font-size: 75%;
142}
143
144a.samples
145{
146 color: #189DE1;
147 text-decoration: none;
148}
149
150form
151{
152 margin: 0;
153 padding: 0;
154}
155
156pre.samples
157{
158 background-color: #F7F7F7;
159 border: 1px solid #D7D7D7;
160 overflow: auto;
161 padding: 0.25em;
162 white-space: pre-wrap; /* CSS 2.1 */
163 word-wrap: break-word; /* IE7 */
164}
165
166#footer
167{
168 clear: both;
169 padding-top: 10px;
170}
171
172#footer hr
173{
174 margin: 10px 0 15px 0;
175 height: 1px;
176 border: solid 1px gray;
177 border-bottom: none;
178}
179
180#footer p
181{
182 margin: 0 10px 10px 10px;
183 float: left;
184}
185
186#footer #copy
187{
188 float: right;
189}
190
191#outputSample
192{
193 width: 100%;
194 table-layout: fixed;
195}
196
197#outputSample thead th
198{
199 color: #dddddd;
200 background-color: #999999;
201 padding: 4px;
202 white-space: nowrap;
203}
204
205#outputSample tbody th
206{
207 vertical-align: top;
208 text-align: left;
209}
210
211#outputSample pre
212{
213 margin: 0;
214 padding: 0;
215}
216
217.description
218{
219 border: 1px dotted #B7B7B7;
220 margin-bottom: 10px;
221 padding: 10px 10px 0;
222 overflow: hidden;
223}
224
225label
226{
227 display: block;
228 margin-bottom: 6px;
229}
230
231/**
232 * CKEditor editables are automatically set with the "cke_editable" class
233 * plus cke_editable_(inline|themed) depending on the editor type.
234 */
235
236/* Style a bit the inline editables. */
237.cke_editable.cke_editable_inline
238{
239 cursor: pointer;
240}
241
242/* Once an editable element gets focused, the "cke_focus" class is
243 added to it, so we can style it differently. */
244.cke_editable.cke_editable_inline.cke_focus
245{
246 box-shadow: inset 0px 0px 20px 3px #ddd, inset 0 0 1px #000;
247 outline: none;
248 background: #eee;
249 cursor: text;
250}
251
252/* Avoid pre-formatted overflows inline editable. */
253.cke_editable_inline pre
254{
255 white-space: pre-wrap;
256 word-wrap: break-word;
257}
258
259/**
260 * Samples index styles.
261 */
262
263.twoColumns,
264.twoColumnsLeft,
265.twoColumnsRight
266{
267 overflow: hidden;
268}
269
270.twoColumnsLeft,
271.twoColumnsRight
272{
273 width: 45%;
274}
275
276.twoColumnsLeft
277{
278 float: left;
279}
280
281.twoColumnsRight
282{
283 float: right;
284}
285
286dl.samples
287{
288 padding: 0 0 0 40px;
289}
290dl.samples > dt
291{
292 display: list-item;
293 list-style-type: disc;
294 list-style-position: outside;
295 margin: 0 0 3px;
296}
297dl.samples > dd
298{
299 margin: 0 0 3px;
300}
301.warning
302{
303 color: #ff0000;
304 background-color: #FFCCBA;
305 border: 2px dotted #ff0000;
306 padding: 15px 10px;
307 margin: 10px 0;
308}
309
310.warning.deprecated {
311 font-size: 1.3em;
312}
313
314/* Used on inline samples */
315
316blockquote
317{
318 font-style: italic;
319 font-family: Georgia, Times, "Times New Roman", serif;
320 padding: 2px 0;
321 border-style: solid;
322 border-color: #ccc;
323 border-width: 0;
324}
325
326.cke_contents_ltr blockquote
327{
328 padding-left: 20px;
329 padding-right: 8px;
330 border-left-width: 5px;
331}
332
333.cke_contents_rtl blockquote
334{
335 padding-left: 8px;
336 padding-right: 20px;
337 border-right-width: 5px;
338}
339
340img.right {
341 border: 1px solid #ccc;
342 float: right;
343 margin-left: 15px;
344 padding: 5px;
345}
346
347img.left {
348 border: 1px solid #ccc;
349 float: left;
350 margin-right: 15px;
351 padding: 5px;
352}
353
354.marker
355{
356 background-color: Yellow;
357}
diff --git a/release/samples/old/sample.js b/release/samples/old/sample.js
new file mode 100644
index 0000000..59b64ee
--- /dev/null
+++ b/release/samples/old/sample.js
@@ -0,0 +1,50 @@
1/**
2 * Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3 * For licensing, see LICENSE.md or http://ckeditor.com/license
4 */
5
6// Tool scripts for the sample pages.
7// This file can be ignored and is not required to make use of CKEditor.
8
9( function() {
10 CKEDITOR.on( 'instanceReady', function( ev ) {
11 // Check for sample compliance.
12 var editor = ev.editor,
13 meta = CKEDITOR.document.$.getElementsByName( 'ckeditor-sample-required-plugins' ),
14 requires = meta.length ? CKEDITOR.dom.element.get( meta[ 0 ] ).getAttribute( 'content' ).split( ',' ) : [],
15 missing = [],
16 i;
17
18 if ( requires.length ) {
19 for ( i = 0; i < requires.length; i++ ) {
20 if ( !editor.plugins[ requires[ i ] ] )
21 missing.push( '<code>' + requires[ i ] + '</code>' );
22 }
23
24 if ( missing.length ) {
25 var warn = CKEDITOR.dom.element.createFromHtml(
26 '<div class="warning">' +
27 '<span>To fully experience this demo, the ' + missing.join( ', ' ) + ' plugin' + ( missing.length > 1 ? 's are' : ' is' ) + ' required.</span>' +
28 '</div>'
29 );
30 warn.insertBefore( editor.container );
31 }
32 }
33
34 // Set icons.
35 var doc = new CKEDITOR.dom.document( document ),
36 icons = doc.find( '.button_icon' );
37
38 for ( i = 0; i < icons.count(); i++ ) {
39 var icon = icons.getItem( i ),
40 name = icon.getAttribute( 'data-icon' ),
41 style = CKEDITOR.skin.getIconStyle( name, ( CKEDITOR.lang.dir == 'rtl' ) );
42
43 icon.addClass( 'cke_button_icon' );
44 icon.addClass( 'cke_button__' + name + '_icon' );
45 icon.setAttribute( 'style', style );
46 icon.setStyle( 'float', 'none' );
47
48 }
49 } );
50} )();
diff --git a/release/samples/old/sample_posteddata.php b/release/samples/old/sample_posteddata.php
new file mode 100644
index 0000000..866867e
--- /dev/null
+++ b/release/samples/old/sample_posteddata.php
@@ -0,0 +1,16 @@
1<?php /* <body><pre>
2
3-------------------------------------------------------------------------------------------
4 CKEditor - Posted Data
5
6 We are sorry, but your Web server does not support the PHP language used in this script.
7
8 Please note that CKEditor can be used with any other server-side language than just PHP.
9 To save the content created with CKEditor you need to read the POST data on the server
10 side and write it to a file or the database.
11
12 Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
13 For licensing, see LICENSE.md or http://ckeditor.com/license
14-------------------------------------------------------------------------------------------
15
16</pre><div style="display:none"></body> */ include "assets/posteddata.php"; ?>
diff --git a/release/samples/old/tabindex.html b/release/samples/old/tabindex.html
new file mode 100644
index 0000000..82ed647
--- /dev/null
+++ b/release/samples/old/tabindex.html
@@ -0,0 +1,78 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>TAB Key-Based Navigation &mdash; CKEditor Sample</title>
10 <script src="../../ckeditor.js"></script>
11 <link href="sample.css" rel="stylesheet">
12 <style>
13
14 .cke_focused,
15 .cke_editable.cke_focused
16 {
17 outline: 3px dotted blue !important;
18 *border: 3px dotted blue !important; /* For IE7 */
19 }
20
21 </style>
22 <script>
23
24 CKEDITOR.on( 'instanceReady', function( evt ) {
25 var editor = evt.editor;
26 editor.setData( 'This editor has it\'s tabIndex set to <strong>' + editor.tabIndex + '</strong>' );
27
28 // Apply focus class name.
29 editor.on( 'focus', function() {
30 editor.container.addClass( 'cke_focused' );
31 });
32 editor.on( 'blur', function() {
33 editor.container.removeClass( 'cke_focused' );
34 });
35
36 // Put startup focus on the first editor in tab order.
37 if ( editor.tabIndex == 1 )
38 editor.focus();
39 });
40
41 </script>
42</head>
43<body>
44 <h1 class="samples">
45 <a href="index.html">CKEditor Samples</a> &raquo; TAB Key-Based Navigation
46 </h1>
47 <div class="warning deprecated">
48 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/tabindex.html">brand new version in CKEditor SDK</a>.
49 </div>
50 <div class="description">
51 <p>
52 This sample shows how tab key navigation among editor instances is
53 affected by the <code>tabIndex</code> attribute from
54 the original page element. Use TAB key to move between the editors.
55 </p>
56 </div>
57 <p>
58 <textarea class="ckeditor" cols="80" id="editor4" rows="10" tabindex="1"></textarea>
59 </p>
60 <div class="ckeditor" contenteditable="true" id="editor1" tabindex="4"></div>
61 <p>
62 <textarea class="ckeditor" cols="80" id="editor2" rows="10" tabindex="2"></textarea>
63 </p>
64 <p>
65 <textarea class="ckeditor" cols="80" id="editor3" rows="10" tabindex="3"></textarea>
66 </p>
67 <div id="footer">
68 <hr>
69 <p>
70 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
71 </p>
72 <p id="copy">
73 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
74 Knabben. All rights reserved.
75 </p>
76 </div>
77</body>
78</html>
diff --git a/release/samples/old/toolbar/toolbar.html b/release/samples/old/toolbar/toolbar.html
new file mode 100644
index 0000000..e40d2a1
--- /dev/null
+++ b/release/samples/old/toolbar/toolbar.html
@@ -0,0 +1,235 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Toolbar Configuration &mdash; CKEditor Sample</title>
10 <meta name="ckeditor-sample-name" content="Toolbar Configurations">
11 <meta name="ckeditor-sample-group" content="Advanced Samples">
12 <meta name="ckeditor-sample-description" content="Configuring CKEditor to display full or custom toolbar layout.">
13 <script src="../../../ckeditor.js"></script>
14 <link href="../../../samples/old/sample.css" rel="stylesheet">
15</head>
16<body>
17 <h1 class="samples">
18 <a href="../../../samples/old/index.html">CKEditor Samples</a> &raquo; Toolbar Configuration
19 </h1>
20 <div class="warning deprecated">
21 This sample is not maintained anymore. Check out the <a href="../../../samples/toolbarconfigurator/index.html#basic">brand new CKEditor Toolbar Configurator</a>.
22 </div>
23 <div class="description">
24 <p>
25 This sample page demonstrates editor with loaded <a href="#fullToolbar">full toolbar</a> (all registered buttons) and, if
26 current editor's configuration modifies default settings, also editor with <a href="#currentToolbar">modified toolbar</a>.
27 </p>
28
29 <p>Since CKEditor 4 there are two ways to configure toolbar buttons.</p>
30
31 <h2 class="samples">By <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbar">config.toolbar</a></h2>
32
33 <p>
34 You can explicitly define which buttons are displayed in which groups and in which order.
35 This is the more precise setting, but less flexible. If newly added plugin adds its
36 own button you'll have to add it manually to your <code>config.toolbar</code> setting as well.
37 </p>
38
39 <p>To add a CKEditor instance with custom toolbar setting, insert the following JavaScript call to your code:</p>
40
41 <pre class="samples">
42CKEDITOR.replace( <em>'textarea_id'</em>, {
43 <strong>toolbar:</strong> [
44 { name: 'document', items: [ 'Source', '-', 'NewPage', 'Preview', '-', 'Templates' ] }, // Defines toolbar group with name (used to create voice label) and items in 3 subgroups.
45 [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ], // Defines toolbar group without name.
46 '/', // Line break - next group will be placed in new line.
47 { name: 'basicstyles', items: [ 'Bold', 'Italic' ] }
48 ]
49});</pre>
50
51 <h2 class="samples">By <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbarGroups">config.toolbarGroups</a></h2>
52
53 <p>
54 You can define which groups of buttons (like e.g. <code>basicstyles</code>, <code>clipboard</code>
55 and <code>forms</code>) are displayed and in which order. Registered buttons are associated
56 with toolbar groups by <code>toolbar</code> property in their definition.
57 This setting's advantage is that you don't have to modify toolbar configuration
58 when adding/removing plugins which register their own buttons.
59 </p>
60
61 <p>To add a CKEditor instance with custom toolbar groups setting, insert the following JavaScript call to your code:</p>
62
63 <pre class="samples">
64CKEDITOR.replace( <em>'textarea_id'</em>, {
65 <strong>toolbarGroups:</strong> [
66 { name: 'document', groups: [ 'mode', 'document' ] }, // Displays document group with its two subgroups.
67 { name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, // Group's name will be used to create voice label.
68 '/', // Line break - next group will be placed in new line.
69 { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
70 { name: 'links' }
71 ]
72
73 // NOTE: Remember to leave 'toolbar' property with the default value (null).
74});</pre>
75 </div>
76
77 <div id="currentToolbar" style="display: none">
78 <h2 class="samples">Current toolbar configuration</h2>
79 <p>Below you can see editor with current toolbar definition.</p>
80 <textarea cols="80" id="editorCurrent" name="editorCurrent" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
81 <pre id="editorCurrentCfg" class="samples"></pre>
82 </div>
83
84 <div id="fullToolbar">
85 <h2 class="samples">Full toolbar configuration</h2>
86 <p>Below you can see editor with full toolbar, generated automatically by the editor.</p>
87 <p>
88 <strong>Note</strong>: To create editor instance with full toolbar you don't have to set anything.
89 Just leave <code>toolbar</code> and <code>toolbarGroups</code> with the default, <code>null</code> values.
90 </p>
91 <textarea cols="80" id="editorFull" name="editorFull" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
92 <pre id="editorFullCfg" class="samples"></pre>
93 </div>
94
95 <script>
96
97(function() {
98 'use strict';
99
100 var buttonsNames;
101
102 CKEDITOR.config.extraPlugins = 'toolbar';
103
104 CKEDITOR.on( 'instanceReady', function( evt ) {
105 var editor = evt.editor,
106 editorCurrent = editor.name == 'editorCurrent',
107 defaultToolbar = !( editor.config.toolbar || editor.config.toolbarGroups || editor.config.removeButtons ),
108 pre = CKEDITOR.document.getById( editor.name + 'Cfg' ),
109 output = '';
110
111 if ( editorCurrent ) {
112 // If default toolbar configuration has been modified, show "current toolbar" section.
113 if ( !defaultToolbar )
114 CKEDITOR.document.getById( 'currentToolbar' ).show();
115 else
116 return;
117 }
118
119 if ( !buttonsNames )
120 buttonsNames = createButtonsNamesHash( editor.ui.items );
121
122 // Toolbar isn't set explicitly, so it was created automatically from toolbarGroups.
123 if ( !editor.config.toolbar ) {
124 output +=
125 '// Toolbar configuration generated automatically by the editor based on config.toolbarGroups.\n' +
126 dumpToolbarConfiguration( editor ) +
127 '\n\n' +
128 '// Toolbar groups configuration.\n' +
129 dumpToolbarConfiguration( editor, true )
130 }
131 // Toolbar groups doesn't count in this case - print only toolbar.
132 else {
133 output += '// Toolbar configuration.\n' +
134 dumpToolbarConfiguration( editor );
135 }
136
137 // Recreate to avoid old IE from loosing whitespaces on filling <pre> content.
138 var preOutput = pre.getOuterHtml().replace( /(?=<\/)/, output );
139 CKEDITOR.dom.element.createFromHtml( preOutput ).replace( pre );
140 } );
141
142 CKEDITOR.replace( 'editorCurrent', { height: 100 } );
143 CKEDITOR.replace( 'editorFull', {
144 // Reset toolbar settings, so full toolbar will be generated automatically.
145 toolbar: null,
146 toolbarGroups: null,
147 removeButtons: null,
148 height: 100
149 } );
150
151 function dumpToolbarConfiguration( editor, printGroups ) {
152 var output = [],
153 toolbar = editor.toolbar;
154
155 for ( var i = 0; i < toolbar.length; ++i ) {
156 var group = dumpToolbarGroup( toolbar[ i ], printGroups );
157 if ( group )
158 output.push( group );
159 }
160
161 return 'config.toolbar' + ( printGroups ? 'Groups' : '' ) + ' = [\n\t' + output.join( ',\n\t' ) + '\n];';
162 }
163
164 function dumpToolbarGroup( group, printGroups ) {
165 var output = [];
166
167 if ( typeof group == 'string' )
168 return '\'' + group + '\'';
169 if ( CKEDITOR.tools.isArray( group ) )
170 return dumpToolbarItems( group );
171 // Skip group when printing entire toolbar configuration and there are no items in this group.
172 if ( !printGroups && !group.items )
173 return;
174
175 if ( group.name )
176 output.push( 'name: \'' + group.name + '\'' );
177
178 if ( group.groups )
179 output.push( 'groups: ' + dumpToolbarItems( group.groups ) );
180
181 if ( !printGroups )
182 output.push( 'items: ' + dumpToolbarItems( group.items ) );
183
184 return '{ ' + output.join( ', ' ) + ' }';
185 }
186
187 function dumpToolbarItems( items ) {
188 if ( typeof items == 'string' )
189 return '\'' + items + '\'';
190
191 var names = [],
192 i, item;
193
194 for ( var i = 0; i < items.length; ++i ) {
195 item = items[ i ];
196 if ( typeof item == 'string' )
197 names.push( item );
198 else {
199 if ( item.type == CKEDITOR.UI_SEPARATOR )
200 names.push( '-' );
201 else
202 names.push( buttonsNames[ item.name ] );
203 }
204 }
205
206 return '[ \'' + names.join( '\', \'' ) + '\' ]';
207 }
208
209 // Creates { 'lowercased': 'LowerCased' } buttons names hash.
210 function createButtonsNamesHash( items ) {
211 var hash = {},
212 name;
213
214 for ( name in items ) {
215 hash[ items[ name ].name ] = name;
216 }
217
218 return hash;
219 }
220
221})();
222 </script>
223
224 <div id="footer">
225 <hr>
226 <p>
227 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
228 </p>
229 <p id="copy">
230 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
231 Knabben. All rights reserved.
232 </p>
233 </div>
234</body>
235</html>
diff --git a/release/samples/old/uicolor.html b/release/samples/old/uicolor.html
new file mode 100644
index 0000000..bff1b96
--- /dev/null
+++ b/release/samples/old/uicolor.html
@@ -0,0 +1,72 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>UI Color Picker &mdash; CKEditor Sample</title>
10 <script src="../../ckeditor.js"></script>
11 <link rel="stylesheet" href="sample.css">
12</head>
13<body>
14 <h1 class="samples">
15 <a href="index.html">CKEditor Samples</a> &raquo; UI Color
16 </h1>
17 <div class="warning deprecated">
18 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/uicolor.html">brand new version in CKEditor SDK</a>.
19 </div>
20 <div class="description">
21 <p>
22 This sample shows how to automatically replace <code>&lt;textarea&gt;</code> elements
23 with a CKEditor instance with an option to change the color of its user interface.<br>
24 <strong>Note:</strong>The UI skin color feature depends on the CKEditor skin
25 compatibility. The Moono and Kama skins are examples of skins that work with it.
26 </p>
27 </div>
28 <form action="sample_posteddata.php" method="post">
29 <p>
30 This editor instance has a UI color value defined in configuration to change the skin color,
31 To specify the color of the user interface, set the <code>uiColor</code> property:
32 </p>
33 <pre class="samples">
34CKEDITOR.replace( '<em>textarea_id</em>', {
35 <strong>uiColor: '#14B8C4'</strong>
36});</pre>
37 <p>
38 Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
39 the <code>&lt;textarea&gt;</code> element to be replaced.
40 </p>
41 <p>
42 <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
43 <script>
44
45 // Replace the <textarea id="editor"> with an CKEditor
46 // instance, using default configurations.
47 CKEDITOR.replace( 'editor1', {
48 uiColor: '#14B8C4',
49 toolbar: [
50 [ 'Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink' ],
51 [ 'FontSize', 'TextColor', 'BGColor' ]
52 ]
53 });
54
55 </script>
56 </p>
57 <p>
58 <input type="submit" value="Submit">
59 </p>
60 </form>
61 <div id="footer">
62 <hr>
63 <p>
64 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
65 </p>
66 <p id="copy">
67 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
68 Knabben. All rights reserved.
69 </p>
70 </div>
71</body>
72</html>
diff --git a/release/samples/old/uilanguages.html b/release/samples/old/uilanguages.html
new file mode 100644
index 0000000..9c1d0b8
--- /dev/null
+++ b/release/samples/old/uilanguages.html
@@ -0,0 +1,122 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>User Interface Globalization &mdash; CKEditor Sample</title>
10 <script src="../../ckeditor.js"></script>
11 <script src="assets/uilanguages/languages.js"></script>
12 <link rel="stylesheet" href="sample.css">
13</head>
14<body>
15 <h1 class="samples">
16 <a href="index.html">CKEditor Samples</a> &raquo; User Interface Languages
17 </h1>
18 <div class="warning deprecated">
19 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/uilanguages.html">brand new version in CKEditor SDK</a>.
20 </div>
21 <div class="description">
22 <p>
23 This sample shows how to automatically replace <code>&lt;textarea&gt;</code> elements
24 with a CKEditor instance with an option to change the language of its user interface.
25 </p>
26 <p>
27 It pulls the language list from CKEditor <code>_languages.js</code> file that contains the list of supported languages and creates
28 a drop-down list that lets the user change the UI language.
29 </p>
30 <p>
31 By default, CKEditor automatically localizes the editor to the language of the user.
32 The UI language can be controlled with two configuration options:
33 <code><a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-language">language</a></code> and
34 <code><a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-defaultLanguage">
35 defaultLanguage</a></code>. The <code>defaultLanguage</code> setting specifies the
36 default CKEditor language to be used when a localization suitable for user's settings is not available.
37 </p>
38 <p>
39 To specify the user interface language that will be used no matter what language is
40 specified in user's browser or operating system, set the <code>language</code> property:
41 </p>
42<pre class="samples">
43CKEDITOR.replace( '<em>textarea_id</em>', {
44 // Load the German interface.
45 <strong>language: 'de'</strong>
46});</pre>
47 <p>
48 Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
49 the <code>&lt;textarea&gt;</code> element to be replaced.
50 </p>
51 </div>
52 <form action="sample_posteddata.php" method="post">
53 <p>
54 Available languages (<span id="count"> </span> languages!):<br>
55 <script>
56
57 document.write( '<select disabled="disabled" id="languages" onchange="createEditor( this.value );">' );
58
59 // Get the language list from the _languages.js file.
60 for ( var i = 0 ; i < window.CKEDITOR_LANGS.length ; i++ ) {
61 document.write(
62 '<option value="' + window.CKEDITOR_LANGS[i].code + '">' +
63 window.CKEDITOR_LANGS[i].name +
64 '</option>' );
65 }
66
67 document.write( '</select>' );
68
69 </script>
70 <br>
71 <span style="color: #888888">
72 (You may see strange characters if your system does not support the selected language)
73 </span>
74 </p>
75 <p>
76 <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
77 <script>
78
79 // Set the number of languages.
80 document.getElementById( 'count' ).innerHTML = window.CKEDITOR_LANGS.length;
81
82 var editor;
83
84 function createEditor( languageCode ) {
85 if ( editor )
86 editor.destroy();
87
88 // Replace the <textarea id="editor"> with an CKEditor
89 // instance, using default configurations.
90 editor = CKEDITOR.replace( 'editor1', {
91 language: languageCode,
92
93 on: {
94 instanceReady: function() {
95 // Wait for the editor to be ready to set
96 // the language combo.
97 var languages = document.getElementById( 'languages' );
98 languages.value = this.langCode;
99 languages.disabled = false;
100 }
101 }
102 });
103 }
104
105 // At page startup, load the default language:
106 createEditor( '' );
107
108 </script>
109 </p>
110 </form>
111 <div id="footer">
112 <hr>
113 <p>
114 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
115 </p>
116 <p id="copy">
117 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
118 Knabben. All rights reserved.
119 </p>
120 </div>
121</body>
122</html>
diff --git a/release/samples/old/wysiwygarea/fullpage.html b/release/samples/old/wysiwygarea/fullpage.html
new file mode 100644
index 0000000..bb3193a
--- /dev/null
+++ b/release/samples/old/wysiwygarea/fullpage.html
@@ -0,0 +1,80 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>Full Page Editing &mdash; CKEditor Sample</title>
10 <script src="../../../ckeditor.js"></script>
11 <script src="../../../samples/old/sample.js"></script>
12 <link rel="stylesheet" href="../../../samples/old/sample.css">
13 <meta name="ckeditor-sample-required-plugins" content="sourcearea">
14 <meta name="ckeditor-sample-name" content="Full page support">
15 <meta name="ckeditor-sample-group" content="Plugins">
16 <meta name="ckeditor-sample-description" content="CKEditor inserted with a JavaScript call and used to edit the whole page from &lt;html&gt; to &lt;/html&gt;.">
17</head>
18<body>
19 <h1 class="samples">
20 <a href="../../../samples/old/index.html">CKEditor Samples</a> &raquo; Full Page Editing
21 </h1>
22 <div class="warning deprecated">
23 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/fullpage.html">brand new version in CKEditor SDK</a>.
24 </div>
25 <div class="description">
26 <p>
27 This sample shows how to configure CKEditor to edit entire HTML pages, from the
28 <code>&lt;html&gt;</code> tag to the <code>&lt;/html&gt;</code> tag.
29 </p>
30 <p>
31 The CKEditor instance below is inserted with a JavaScript call using the following code:
32 </p>
33<pre class="samples">
34CKEDITOR.replace( '<em>textarea_id</em>', {
35 <strong>fullPage: true</strong>,
36 <strong>allowedContent: true</strong>
37});
38</pre>
39 <p>
40 Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
41 the <code>&lt;textarea&gt;</code> element to be replaced.
42 </p>
43 <p>
44 The <code><em>allowedContent</em></code> in the code above is set to <code>true</code> to disable content filtering.
45 Setting this option is not obligatory, but in full page mode there is a strong chance that one may want be able to freely enter any HTML content in source mode without any limitations.
46 </p>
47 </div>
48 <form action="../../../samples/sample_posteddata.php" method="post">
49 <label for="editor1">
50 CKEditor output the entire page including content outside of
51 <code>&lt;body&gt;</code> element, so content like meta and title can be changed:
52 </label>
53 <textarea cols="80" id="editor1" name="editor1" rows="10">
54 &lt;h1&gt;&lt;img align=&quot;right&quot; alt=&quot;Saturn V carrying Apollo 11&quot; src=&quot;../../../samples/old/assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
55 </textarea>
56 <script>
57
58 CKEDITOR.replace( 'editor1', {
59 fullPage: true,
60 allowedContent: true,
61 extraPlugins: 'wysiwygarea'
62 });
63
64 </script>
65 <p>
66 <input type="submit" value="Submit">
67 </p>
68 </form>
69 <div id="footer">
70 <hr>
71 <p>
72 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
73 </p>
74 <p id="copy">
75 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
76 Knabben. All rights reserved.
77 </p>
78 </div>
79</body>
80</html>
diff --git a/release/samples/old/xhtmlstyle.html b/release/samples/old/xhtmlstyle.html
new file mode 100644
index 0000000..daf5879
--- /dev/null
+++ b/release/samples/old/xhtmlstyle.html
@@ -0,0 +1,234 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<html>
7<head>
8 <meta charset="utf-8">
9 <title>XHTML Compliant Output &mdash; CKEditor Sample</title>
10 <meta name="ckeditor-sample-required-plugins" content="sourcearea">
11 <script src="../../ckeditor.js"></script>
12 <script src="sample.js"></script>
13 <link href="sample.css" rel="stylesheet">
14</head>
15<body>
16 <h1 class="samples">
17 <a href="index.html">CKEditor Samples</a> &raquo; Producing XHTML Compliant Output
18 </h1>
19 <div class="warning deprecated">
20 This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/basicstyles.html">brand new version in CKEditor SDK</a>.
21 </div>
22 <div class="description">
23 <p>
24 This sample shows how to configure CKEditor to output valid
25 <a class="samples" href="http://www.w3.org/TR/xhtml11/">XHTML 1.1</a> code.
26 Deprecated elements (<code>&lt;font&gt;</code>, <code>&lt;u&gt;</code>) or attributes
27 (<code>size</code>, <code>face</code>) will be replaced with XHTML compliant code.
28 </p>
29 <p>
30 To add a CKEditor instance outputting valid XHTML code, load the editor using a standard
31 JavaScript call and define CKEditor features to use the XHTML compliant elements and styles.
32 </p>
33 <p>
34 A snippet of the configuration code can be seen below; check the source of this page for
35 full definition:
36 </p>
37<pre class="samples">
38CKEDITOR.replace( '<em>textarea_id</em>', {
39 contentsCss: 'assets/outputxhtml.css',
40
41 coreStyles_bold: {
42 element: 'span',
43 attributes: { 'class': 'Bold' }
44 },
45 coreStyles_italic: {
46 element: 'span',
47 attributes: { 'class': 'Italic' }
48 },
49
50 ...
51});</pre>
52 </div>
53 <form action="sample_posteddata.php" method="post">
54 <p>
55 <label for="editor1">
56 Editor 1:
57 </label>
58 <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;span class="Bold"&gt;sample text&lt;/span&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
59 <script>
60
61 CKEDITOR.replace( 'editor1', {
62 /*
63 * Style sheet for the contents
64 */
65 contentsCss: 'assets/outputxhtml/outputxhtml.css',
66
67 /*
68 * Special allowed content rules for spans used by
69 * font face, size, and color buttons.
70 *
71 * Note: all rules have been written separately so
72 * it was possible to specify required classes.
73 */
74 extraAllowedContent: 'span(!FontColor1);span(!FontColor2);span(!FontColor3);' +
75 'span(!FontColor1BG);span(!FontColor2BG);span(!FontColor3BG);' +
76 'span(!FontComic);span(!FontCourier);span(!FontTimes);' +
77 'span(!FontSmaller);span(!FontLarger);span(!FontSmall);span(!FontBig);span(!FontDouble)',
78
79 /*
80 * Core styles.
81 */
82 coreStyles_bold: {
83 element: 'span',
84 attributes: { 'class': 'Bold' }
85 },
86 coreStyles_italic: {
87 element: 'span',
88 attributes: { 'class': 'Italic' }
89 },
90 coreStyles_underline: {
91 element: 'span',
92 attributes: { 'class': 'Underline' }
93 },
94 coreStyles_strike: {
95 element: 'span',
96 attributes: { 'class': 'StrikeThrough' },
97 overrides: 'strike'
98 },
99 coreStyles_subscript: {
100 element: 'span',
101 attributes: { 'class': 'Subscript' },
102 overrides: 'sub'
103 },
104 coreStyles_superscript: {
105 element: 'span',
106 attributes: { 'class': 'Superscript' },
107 overrides: 'sup'
108 },
109
110 /*
111 * Font face.
112 */
113
114 // List of fonts available in the toolbar combo. Each font definition is
115 // separated by a semi-colon (;). We are using class names here, so each font
116 // is defined by {Combo Label}/{Class Name}.
117 font_names: 'Comic Sans MS/FontComic;Courier New/FontCourier;Times New Roman/FontTimes',
118
119 // Define the way font elements will be applied to the document. The "span"
120 // element will be used. When a font is selected, the font name defined in the
121 // above list is passed to this definition with the name "Font", being it
122 // injected in the "class" attribute.
123 // We must also instruct the editor to replace span elements that are used to
124 // set the font (Overrides).
125 font_style: {
126 element: 'span',
127 attributes: { 'class': '#(family)' },
128 overrides: [
129 {
130 element: 'span',
131 attributes: {
132 'class': /^Font(?:Comic|Courier|Times)$/
133 }
134 }
135 ]
136 },
137
138 /*
139 * Font sizes.
140 */
141 fontSize_sizes: 'Smaller/FontSmaller;Larger/FontLarger;8pt/FontSmall;14pt/FontBig;Double Size/FontDouble',
142 fontSize_style: {
143 element: 'span',
144 attributes: { 'class': '#(size)' },
145 overrides: [
146 {
147 element: 'span',
148 attributes: {
149 'class': /^Font(?:Smaller|Larger|Small|Big|Double)$/
150 }
151 }
152 ]
153 } ,
154
155 /*
156 * Font colors.
157 */
158 colorButton_enableMore: false,
159
160 colorButton_colors: 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00',
161 colorButton_foreStyle: {
162 element: 'span',
163 attributes: { 'class': '#(color)' },
164 overrides: [
165 {
166 element: 'span',
167 attributes: {
168 'class': /^FontColor(?:1|2|3)$/
169 }
170 }
171 ]
172 },
173
174 colorButton_backStyle: {
175 element: 'span',
176 attributes: { 'class': '#(color)BG' },
177 overrides: [
178 {
179 element: 'span',
180 attributes: {
181 'class': /^FontColor(?:1|2|3)BG$/
182 }
183 }
184 ]
185 },
186
187 /*
188 * Indentation.
189 */
190 indentClasses: [ 'Indent1', 'Indent2', 'Indent3' ],
191
192 /*
193 * Paragraph justification.
194 */
195 justifyClasses: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull' ],
196
197 /*
198 * Styles combo.
199 */
200 stylesSet: [
201 { name: 'Strong Emphasis', element: 'strong' },
202 { name: 'Emphasis', element: 'em' },
203
204 { name: 'Computer Code', element: 'code' },
205 { name: 'Keyboard Phrase', element: 'kbd' },
206 { name: 'Sample Text', element: 'samp' },
207 { name: 'Variable', element: 'var' },
208
209 { name: 'Deleted Text', element: 'del' },
210 { name: 'Inserted Text', element: 'ins' },
211
212 { name: 'Cited Work', element: 'cite' },
213 { name: 'Inline Quotation', element: 'q' }
214 ]
215 });
216
217 </script>
218 </p>
219 <p>
220 <input type="submit" value="Submit">
221 </p>
222 </form>
223 <div id="footer">
224 <hr>
225 <p>
226 CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
227 </p>
228 <p id="copy">
229 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
230 Knabben. All rights reserved.
231 </p>
232 </div>
233</body>
234</html>
diff --git a/release/samples/toolbarconfigurator/css/fontello.css b/release/samples/toolbarconfigurator/css/fontello.css
new file mode 100644
index 0000000..d983707
--- /dev/null
+++ b/release/samples/toolbarconfigurator/css/fontello.css
@@ -0,0 +1,55 @@
1@font-face {
2 font-family: 'fontello';
3 src: url('../font/fontello.eot?89024372');
4 src: url('../font/fontello.eot?89024372#iefix') format('embedded-opentype'),
5 url('../font/fontello.woff?89024372') format('woff'),
6 url('../font/fontello.ttf?89024372') format('truetype'),
7 url('../font/fontello.svg?89024372#fontello') format('svg');
8 font-weight: normal;
9 font-style: normal;
10}
11/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
12/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
13/*
14@media screen and (-webkit-min-device-pixel-ratio:0) {
15 @font-face {
16 font-family: 'fontello';
17 src: url('../font/fontello.svg?89024372#fontello') format('svg');
18 }
19}
20*/
21
22 [class^="icon-"]:before, [class*=" icon-"]:before {
23 font-family: "fontello";
24 font-style: normal;
25 font-weight: normal;
26 speak: none;
27
28 display: inline-block;
29 text-decoration: inherit;
30 width: 1em;
31 margin-right: .2em;
32 text-align: center;
33 /* opacity: .8; */
34
35 /* For safety - reset parent styles, that can break glyph codes*/
36 font-variant: normal;
37 text-transform: none;
38
39 /* fix buttons height, for twitter bootstrap */
40 line-height: 1em;
41
42 /* Animation center compensation - margins should be symmetric */
43 /* remove if not needed */
44 margin-left: .2em;
45
46 /* you can be more comfortable with increased icons size */
47 /* font-size: 120%; */
48
49 /* Uncomment for 3D effect */
50 /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
51}
52
53.icon-trash:before { content: '\e802'; } /* '' */
54.icon-down-big:before { content: '\e800'; } /* '' */
55.icon-up-big:before { content: '\e801'; } /* '' */
diff --git a/release/samples/toolbarconfigurator/font/LICENSE.txt b/release/samples/toolbarconfigurator/font/LICENSE.txt
new file mode 100644
index 0000000..4a73f6c
--- /dev/null
+++ b/release/samples/toolbarconfigurator/font/LICENSE.txt
@@ -0,0 +1,10 @@
1Font license info
2
3
4## Font Awesome
5
6 Copyright (C) 2012 by Dave Gandy
7
8 Author: Dave Gandy
9 License: SIL ()
10 Homepage: http://fortawesome.github.com/Font-Awesome/
diff --git a/release/samples/toolbarconfigurator/font/config.json b/release/samples/toolbarconfigurator/font/config.json
new file mode 100644
index 0000000..94809d7
--- /dev/null
+++ b/release/samples/toolbarconfigurator/font/config.json
@@ -0,0 +1,28 @@
1{
2 "name": "",
3 "css_prefix_text": "icon-",
4 "css_use_suffix": false,
5 "hinting": true,
6 "units_per_em": 1000,
7 "ascent": 850,
8 "glyphs": [
9 {
10 "uid": "f48ae54adfb27d8ada53d0fd9e34ee10",
11 "css": "trash-empty",
12 "code": 59392,
13 "src": "fontawesome"
14 },
15 {
16 "uid": "1c4068ed75209e21af36017df8871802",
17 "css": "down-big",
18 "code": 59393,
19 "src": "fontawesome"
20 },
21 {
22 "uid": "95376bf082bfec6ce06ea1cda7bd7ead",
23 "css": "up-big",
24 "code": 59394,
25 "src": "fontawesome"
26 }
27 ]
28} \ No newline at end of file
diff --git a/release/samples/toolbarconfigurator/font/fontello.eot b/release/samples/toolbarconfigurator/font/fontello.eot
new file mode 100644
index 0000000..2732fad
--- /dev/null
+++ b/release/samples/toolbarconfigurator/font/fontello.eot
Binary files differ
diff --git a/release/samples/toolbarconfigurator/font/fontello.svg b/release/samples/toolbarconfigurator/font/fontello.svg
new file mode 100644
index 0000000..33d14ac
--- /dev/null
+++ b/release/samples/toolbarconfigurator/font/fontello.svg
@@ -0,0 +1,14 @@
1<?xml version="1.0" standalone="no"?>
2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3<svg xmlns="http://www.w3.org/2000/svg">
4<metadata>Copyright (C) 2014 by original authors @ fontello.com</metadata>
5<defs>
6<font id="fontello" horiz-adv-x="1000" >
7<font-face font-family="fontello" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
8<missing-glyph horiz-adv-x="1000" />
9<glyph glyph-name="trash" unicode="&#xe802;" d="m286 439v-321q0-8-5-13t-13-5h-36q-8 0-13 5t-5 13v321q0 8 5 13t13 5h36q8 0 13-5t5-13z m143 0v-321q0-8-5-13t-13-5h-36q-8 0-13 5t-5 13v321q0 8 5 13t13 5h36q8 0 13-5t5-13z m142 0v-321q0-8-5-13t-12-5h-36q-8 0-13 5t-5 13v321q0 8 5 13t13 5h36q7 0 12-5t5-13z m72-404v529h-500v-529q0-12 4-22t8-15t6-5h464q2 0 6 5t8 15t4 22z m-375 601h250l-27 65q-4 5-9 6h-177q-6-1-10-6z m518-18v-36q0-8-5-13t-13-5h-54v-529q0-46-26-80t-63-34h-464q-37 0-63 33t-27 79v531h-53q-8 0-13 5t-5 13v36q0 8 5 13t13 5h172l39 93q9 21 31 35t44 15h178q22 0 44-15t30-35l39-93h173q8 0 13-5t5-13z" horiz-adv-x="785.7" />
10<glyph glyph-name="down-big" unicode="&#xe800;" d="m899 386q0-30-21-50l-363-364q-22-21-51-21q-29 0-50 21l-363 364q-21 20-21 50q0 29 21 51l41 41q22 21 51 21q29 0 50-21l164-164v393q0 29 21 50t51 22h71q29 0 50-22t21-50v-393l164 164q21 21 51 21q29 0 50-21l42-42q21-21 21-50z" horiz-adv-x="928.6" />
11<glyph glyph-name="up-big" unicode="&#xe801;" d="m899 308q0-28-21-50l-42-42q-21-21-50-21q-30 0-51 21l-164 164v-393q0-29-20-47t-51-19h-71q-30 0-51 19t-21 47v393l-164-164q-20-21-50-21t-50 21l-42 42q-21 21-21 50q0 30 21 51l363 363q20 21 50 21q30 0 51-21l363-363q21-22 21-51z" horiz-adv-x="928.6" />
12</font>
13</defs>
14</svg> \ No newline at end of file
diff --git a/release/samples/toolbarconfigurator/font/fontello.ttf b/release/samples/toolbarconfigurator/font/fontello.ttf
new file mode 100644
index 0000000..fbcbf06
--- /dev/null
+++ b/release/samples/toolbarconfigurator/font/fontello.ttf
Binary files differ
diff --git a/release/samples/toolbarconfigurator/font/fontello.woff b/release/samples/toolbarconfigurator/font/fontello.woff
new file mode 100644
index 0000000..e1d5647
--- /dev/null
+++ b/release/samples/toolbarconfigurator/font/fontello.woff
Binary files differ
diff --git a/release/samples/toolbarconfigurator/index.html b/release/samples/toolbarconfigurator/index.html
new file mode 100644
index 0000000..1dac0b4
--- /dev/null
+++ b/release/samples/toolbarconfigurator/index.html
@@ -0,0 +1,446 @@
1<!DOCTYPE html>
2<!--
3Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
4For licensing, see LICENSE.md or http://ckeditor.com/license
5-->
6<!--[if IE 8]><html class="ie8"><![endif]-->
7<!--[if gt IE 8]><html><![endif]-->
8<!--[if !IE]><!--><html><!--<![endif]-->
9<head>
10 <meta charset="utf-8">
11 <title>Toolbar Configurator</title>
12 <script src="../../ckeditor.js"></script>
13 <script>
14 if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )
15 CKEDITOR.tools.enableHtml5Elements( document );
16 </script>
17 <link rel="stylesheet" href="lib/codemirror/codemirror.css">
18 <link rel="stylesheet" href="lib/codemirror/show-hint.css">
19 <link rel="stylesheet" href="lib/codemirror/neo.css">
20 <link rel="stylesheet" href="css/fontello.css">
21 <link rel="stylesheet" href="../css/samples.css">
22</head>
23<body id="toolbar">
24
25<nav class="navigation-a">
26 <div class="grid-container">
27 <ul class="navigation-a-left grid-width-70">
28 <li><a href="http://ckeditor.com">Project Homepage</a></li>
29 <li><a href="http://dev.ckeditor.com/">I found a bug</a></li>
30 <li><a href="http://github.com/ckeditor/ckeditor-dev" class="icon-pos-right icon-navigation-a-github">Fork CKEditor on GitHub</a></li>
31 </ul>
32 <ul class="navigation-a-right grid-width-30">
33 <li><a href="http://ckeditor.com/blog-list">CKEditor Blog</a></li>
34 </ul>
35 </div>
36</nav>
37
38<header class="header-a">
39 <div class="grid-container">
40 <h1 class="header-a-logo grid-width-30">
41 <a href="../index.html"><img src="../img/logo.png" alt="CKEditor Logo"></a>
42 </h1>
43 <nav class="navigation-b grid-width-70">
44 <ul>
45 <li><a href="../index.html" class="button-a">Start</a></li>
46 <li><a href="index.html" class="button-a button-a-background">Toolbar configurator</a></li>
47 </ul>
48 </nav>
49 </div>
50</header>
51
52<main>
53 <div class="adjoined-top">
54 <div class="grid-container">
55 <div class="content grid-width-100">
56 <div class="grid-container-nested">
57 <h1 class="grid-width-60">
58 Toolbar Configurator
59 <a href="#help-content" type="button" title="Configurator help" id="help" class="button-a button-a-background button-a-no-text icon-pos-left icon-question-mark">Help</a>
60 </h1>
61
62 <div class="grid-width-40 grid-switch-magic">
63 <div class="switch">
64 <span class="balloon-a balloon-a-se">Select configurator type</span>
65 <input type="radio" name="radio" data-num="1" id="radio-basic" />
66 <input type="radio" name="radio" data-num="2" id="radio-advanced" />
67 <label data-for="1" for="radio-basic">Basic</label>
68 <span class="switch-inner">
69 <span class="handler"></span>
70 </span>
71 <label data-for="2" for="radio-advanced">Advanced</label>
72 </div>
73 </div>
74 </div>
75 </div>
76 </div>
77 </div>
78 <div class="adjoined-bottom">
79 <div class="grid-container">
80 <div class="grid-width-100">
81 <div class="editors-container">
82 <div id="editor-basic"></div>
83 <div id="editor-advanced"></div>
84 </div>
85 </div>
86 </div>
87 </div>
88
89 <div class="grid-container configurator">
90 <div class="content grid-width-100">
91 <div class="configurator">
92 <div>
93 <div id="toolbarModifierWrapper"></div>
94 </div>
95 </div>
96 </div>
97 </div>
98
99 <div id="help-content">
100 <div class="grid-container">
101 <div class="grid-width-100">
102 <h2>What Am I Doing Here?</h2>
103
104 <div class="grid-container grid-container-nested">
105 <div class="basic">
106 <div class="grid-width-50">
107 <p>Arrange <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbarGroups">toolbar groups</a>, toggle <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-removeButtons">button visibility</a> according to your needs and get your toolbar configuration.</p>
108 <p>You can replace the content of the <a href="../../config.js"><code>config.js</code></a> file with the generated configuration. If you already set some configuration options you will need to merge both configurations.</p>
109 </div>
110 <div class="grid-width-50">
111 <p>Read more about different ways of <a href="http://docs.ckeditor.com/#!/guide/dev_configuration">setting configuration</a> and do not forget about <strong>clearing browser cache</strong>.</p>
112 <p>Arranging toolbar groups is the recommended way of configuring the toolbar, but if you need more freedom you can use the <a href="#advanced">advanced configurator</a>.</p>
113 </div>
114 </div>
115 <div class="advanced" style="display: none;">
116 <div class="grid-width-50">
117 <p>With this code editor you can edit your <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbar">toolbar configuration</a> live.</p>
118 <p>You can replace the content of the <a href="../../config.js"><code>config.js</code></a> file with the generated configuration. If you already set some configuration options you will need to merge both configurations.</p>
119 </div>
120 <div class="grid-width-50">
121 <p>Read more about different ways of <a href="http://docs.ckeditor.com/#!/guide/dev_configuration">setting configuration</a> and do not forget about <strong>clearing browser cache</strong>.</p>
122 </div>
123 </div>
124 </div>
125
126 <p class="grid-container grid-container-nested">
127 <button type="button" class="help-content-close grid-width-100 button-a button-a-background">Got it. Let's play!</button>
128 </p>
129 </div>
130 </div>
131 </div>
132</main>
133
134<footer class="footer-a grid-container">
135 <p class="grid-width-100">
136 CKEditor &ndash; The text editor for the Internet &ndash; <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
137 </p>
138 <p class="grid-width-100" id="copy">
139 Copyright &copy; 2003-2017, <a class="samples" href="http://cksource.com/">CKSource</a> &ndash; Frederico Knabben. All rights reserved.
140 </p>
141</footer>
142
143<script src="lib/codemirror/codemirror.js"></script>
144<script src="lib/codemirror/javascript.js"></script>
145<script src="lib/codemirror/show-hint.js"></script>
146
147<script src="js/fulltoolbareditor.js"></script>
148<script src="js/abstracttoolbarmodifier.js"></script>
149<script src="js/toolbarmodifier.js"></script>
150<script src="js/toolbartextmodifier.js"></script>
151<script src="../js/sf.js"></script>
152
153<script>
154 ( function() {
155 'use strict';
156
157 var mode = ( window.location.hash.substr( 1 ) === 'advanced' ) ? 'advanced' : 'basic',
158 configuratorSection = CKEDITOR.document.findOne( 'main > .grid-container.configurator' ),
159 basicInstruction = CKEDITOR.document.findOne( '#help-content .basic' ),
160 advancedInstruction = CKEDITOR.document.findOne( '#help-content .advanced' ),
161
162 // Configurator mode switcher.
163 modeSwitchBasic = CKEDITOR.document.getById( 'radio-basic' ),
164 modeSwitchAdvanced = CKEDITOR.document.getById( 'radio-advanced' );
165
166 // Initial setup
167 function updateSwitcher() {
168 if ( mode === 'advanced' ) {
169 modeSwitchAdvanced.$.checked = true;
170 } else {
171 modeSwitchBasic.$.checked = true;
172 }
173 }
174
175 updateSwitcher();
176
177 CKEDITOR.document.getWindow().on( 'hashchange', function( e ) {
178 var hash = window.location.hash.substr( 1 );
179 if ( !( hash === 'advanced' || hash === 'basic' ) ) {
180 return;
181 }
182 mode = hash;
183 onToolbarsDone( mode );
184 } );
185
186 CKEDITOR.document.getWindow().on( 'resize', function() {
187 updateToolbar( ( mode === 'basic' ? toolbarModifier : toolbarTextModifier )[ 'editorInstance' ] );
188 } );
189
190 function onRefresh( modifier ) {
191 modifier = modifier || this;
192
193 if ( mode === 'basic' && modifier instanceof ToolbarConfigurator.ToolbarTextModifier ) {
194 return;
195 }
196
197 // CodeMirror container becomes visible, so we need to refresh and to avoid rendering problems.
198 if ( mode === 'advanced' && modifier instanceof ToolbarConfigurator.ToolbarTextModifier ) {
199 modifier.codeContainer.refresh();
200 }
201
202 updateToolbar( modifier.editorInstance );
203 }
204
205 function updateToolbar( editor ) {
206 var editorContainer = editor.container;
207
208 // Not always editor is loaded.
209 if ( !editorContainer ) {
210 return;
211 }
212
213 var displayStyle = editorContainer.getStyle( 'display' );
214
215 editorContainer.setStyle( 'display', 'block' );
216
217 var newHeight = editorContainer.getSize( 'height' );
218
219 var newMarginTop = parseInt( editorContainer.getComputedStyle( 'margin-top' ), 10 );
220 newMarginTop = ( isNaN( newMarginTop ) ? 0 : Number( newMarginTop ) );
221
222 var newMarginBottom = parseInt( editorContainer.getComputedStyle( 'margin-bottom' ), 10 );
223 newMarginBottom = ( isNaN( newMarginBottom ) ? 0 : Number( newMarginBottom ) );
224
225 var result = newHeight + newMarginTop + newMarginBottom;
226
227 editorContainer.setStyle( 'display', displayStyle );
228
229 editor.container.getAscendant( 'div' ).setStyle( 'height', result + 'px' );
230 }
231
232 var toolbarModifier = new ToolbarConfigurator.ToolbarModifier( 'editor-basic' );
233
234 var done = 0;
235 toolbarModifier.init( onToolbarInit );
236 toolbarModifier.onRefresh = onRefresh;
237
238 CKEDITOR.document.getById( 'toolbarModifierWrapper' ).append( toolbarModifier.mainContainer );
239
240 var toolbarTextModifier = new ToolbarConfigurator.ToolbarTextModifier( 'editor-advanced' );
241 toolbarTextModifier.init( onToolbarInit );
242 toolbarTextModifier.onRefresh = onRefresh;
243
244 function onToolbarInit() {
245 if ( ++done === 2 ) {
246 onToolbarsDone();
247
248 positionSticky.watch( CKEDITOR.document.findOne( '.toolbar' ), function() {
249 return mode === 'advanced';
250 } );
251 }
252 }
253
254 function onToolbarsDone() {
255 if ( mode === 'basic' ) {
256 toggleModeBasic( false );
257 } else {
258 toggleModeAdvanced( false );
259 }
260
261 updateSwitcher();
262
263 setTimeout( function() {
264 CKEDITOR.document.findOne( '.editors-container' ).addClass( 'active' );
265 CKEDITOR.document.findOne( '#toolbarModifierWrapper' ).addClass( 'active' );
266 }, 200 );
267 }
268
269 CKEDITOR.document.getById( 'toolbarModifierWrapper' ).append( toolbarTextModifier.mainContainer );
270
271 function toogleModeSwitch( onElement, offElement, onModifier, offModifier ) {
272 onElement.addClass( 'fancy-button-active' );
273 offElement.removeClass( 'fancy-button-active' );
274
275 onModifier.showUI();
276 offModifier.hideUI();
277 }
278
279 function toggleModeBasic( callOnRefresh ) {
280 callOnRefresh = ( callOnRefresh !== false );
281 mode = 'basic';
282 window.location.hash = '#basic';
283 toogleModeSwitch( modeSwitchBasic, modeSwitchAdvanced, toolbarModifier, toolbarTextModifier );
284
285 configuratorSection.removeClass( 'freed-width' );
286 basicInstruction.show();
287 advancedInstruction.hide();
288
289 callOnRefresh && onRefresh( toolbarModifier );
290 }
291
292 function toggleModeAdvanced( callOnRefresh ) {
293 callOnRefresh = ( callOnRefresh !== false );
294 mode = 'advanced';
295 window.location.hash = '#advanced';
296 toogleModeSwitch( modeSwitchAdvanced, modeSwitchBasic, toolbarTextModifier, toolbarModifier );
297
298 configuratorSection.addClass( 'freed-width' );
299 advancedInstruction.show();
300 basicInstruction.hide();
301
302 callOnRefresh && onRefresh( toolbarTextModifier );
303 }
304
305 modeSwitchBasic.on( 'click', toggleModeBasic );
306 modeSwitchAdvanced.on( 'click', toggleModeAdvanced );
307
308 //
309 // Position:sticky for the toolbar.
310 //
311
312 // Will make elements behave like they were styled with position:sticky.
313 var positionSticky = {
314 // Store object: {
315 // element: CKEDITOR.dom.element, // Element which will float.
316 // placeholder: CKEDITOR.dom.element, // Placeholder which is place to prevent page bounce.
317 // isFixed: boolean // Whether element float now.
318 // }
319 watched: [],
320
321 active: [],
322
323 staticContainer: null,
324
325 init: function() {
326 var element = CKEDITOR.dom.element.createFromHtml(
327 '<div class="staticContainer">' +
328 '<div class="grid-container" >' +
329 '<div class="grid-width-100">' +
330 '<div class="inner"></div>' +
331 '</div>' +
332 '</div>' +
333 '</div>' );
334
335 this.staticContainer = element.findOne( '.inner' );
336
337 CKEDITOR.document.getBody().append( element );
338 },
339
340 watch: function( element, preventFunc ) {
341 this.watched.push( {
342 element: element,
343 placeholder: new CKEDITOR.dom.element( 'div' ),
344 isFixed: false,
345 preventFunc: preventFunc
346 } );
347 },
348
349 checkAll: function() {
350 for ( var i = 0; i < this.watched.length; i++ ) {
351 this.check( this.watched[ i ] );
352 }
353 },
354
355 check: function( element ) {
356 var isFixed = element.isFixed;
357 var shouldBeFixed = this.shouldBeFixed( element );
358
359 // Nothing to be done.
360 if ( isFixed === shouldBeFixed ) {
361 return;
362 }
363
364 var placeholder = element.placeholder;
365
366 if ( isFixed ) {
367 // Unfixing.
368
369 element.element.insertBefore( placeholder );
370 placeholder.remove();
371
372 element.element.removeStyle( 'margin' );
373
374 this.active.splice( CKEDITOR.tools.indexOf( this.active, element ), 1 );
375
376 } else {
377 // Fixing.
378 placeholder.setStyle( 'width', element.element.getSize( 'width' ) + 'px' );
379 placeholder.setStyle( 'height', element.element.getSize( 'height' ) + 'px' );
380 placeholder.setStyle( 'margin-bottom', element.element.getComputedStyle( 'margin-bottom' ) );
381 placeholder.setStyle( 'display', element.element.getComputedStyle( 'display' ) );
382 placeholder.insertAfter( element.element );
383
384 this.staticContainer.append( element.element );
385
386 this.active.push( element );
387 }
388
389 element.isFixed = !element.isFixed;
390 },
391
392 shouldBeFixed: function( element ) {
393 if ( element.preventFunc && element.preventFunc() ) {
394 return false;
395 }
396
397 // If element is already fixed we are checking it's placeholder.
398 var related = ( element.isFixed ? element.placeholder : element.element ),
399 clientRect = related.$.getBoundingClientRect(),
400 staticHeight = this.staticContainer.getSize('height' ),
401 elemHeight = element.element.getSize( 'height' );
402
403 if ( element.isFixed ) {
404 return ( clientRect.top + elemHeight < staticHeight );
405 } else {
406 return ( clientRect.top < staticHeight );
407 }
408 }
409 };
410
411 positionSticky.init();
412
413 CKEDITOR.document.getWindow().on( 'scroll',
414 new CKEDITOR.tools.eventsBuffer( 100, positionSticky.checkAll, positionSticky ).input
415 );
416
417 // Make the toolbar sticky.
418 positionSticky.watch( CKEDITOR.document.findOne( '.editors-container' ) );
419
420 // Help button and help-content.
421 ( function() {
422 var helpButton = CKEDITOR.document.getById( 'help' ),
423 helpContent = CKEDITOR.document.getById( 'help-content' );
424
425 // Don't show help button on IE8 because it's unsupported by Pico Modal.
426 if ( CKEDITOR.env.ie && CKEDITOR.env.version == 8 ) {
427 helpButton.hide();
428 } else {
429 // Display help modal when the button is clicked.
430 helpButton.on( 'click', function( evt ) {
431 SF.modal( {
432 // Clone modal content from DOM.
433 content: helpContent.getHtml(),
434
435 afterCreate: function( modal ) {
436 // Enable modal content button to close the modal.
437 new CKEDITOR.dom.element( modal.modalElem() ).findOne( '.help-content-close' ).once( 'click', modal.close );
438 }
439 } ).show();
440 } );
441 }
442 } )();
443 } )();
444</script>
445</body>
446</html>
diff --git a/release/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js b/release/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js
new file mode 100644
index 0000000..65f0b87
--- /dev/null
+++ b/release/samples/toolbarconfigurator/js/abstracttoolbarmodifier.js
@@ -0,0 +1,13 @@
1"function"!=typeof Object.create&&function(){var a=function(){};Object.create=function(b){if(1<arguments.length)throw Error("Second argument not supported");if(null===b)throw Error("Cannot set a null [[Prototype]]");if("object"!=typeof b)throw TypeError("Argument must be an object");a.prototype=b;return new a}}();
2CKEDITOR.plugins.add("toolbarconfiguratorarea",{afterInit:function(a){a.addMode("wysiwyg",function(b){var c=CKEDITOR.dom.element.createFromHtml('\x3cdiv class\x3d"cke_wysiwyg_div cke_reset" hidefocus\x3d"true"\x3e\x3c/div\x3e');a.ui.space("contents").append(c);c=a.editable(c);c.detach=CKEDITOR.tools.override(c.detach,function(b){return function(){b.apply(this,arguments);this.remove()}});a.setData(a.getData(1),b);a.fire("contentDom")});a.dataProcessor.toHtml=function(b){return b};a.dataProcessor.toDataFormat=
3function(b){return b}}});Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c="toString toLocaleString valueOf hasOwnProperty isPrototypeOf propertyIsEnumerable constructor".split(" "),e=c.length;return function(d){if("object"!==typeof d&&("function"!==typeof d||null===d))throw new TypeError("Object.keys called on non-object");var g=[],f;for(f in d)a.call(d,f)&&g.push(f);if(b)for(f=0;f<e;f++)a.call(d,c[f])&&g.push(c[f]);return g}}());
4(function(){function a(b,c){this.cfg=c||{};this.hidden=!1;this.editorId=b;this.fullToolbarEditor=new ToolbarConfigurator.FullToolbarEditor;this.actualConfig=this.originalConfig=this.mainContainer=null;this.isEditableVisible=this.waitForReady=!1;this.toolbarContainer=null;this.toolbarButtons=[]}ToolbarConfigurator.AbstractToolbarModifier=a;a.prototype.setConfig=function(b){this._onInit(void 0,b,!0)};a.prototype.init=function(b){var c=this;this.mainContainer=new CKEDITOR.dom.element("div");if(null!==
5this.fullToolbarEditor.editorInstance)throw"Only one instance of ToolbarModifier is allowed";this.editorInstance||this._createEditor(!1);this.editorInstance.once("loaded",function(){c.fullToolbarEditor.init(function(){c._onInit(b);if("function"==typeof c.onRefresh)c.onRefresh()},c.editorInstance.config)});return this.mainContainer};a.prototype._onInit=function(b,c){this.originalConfig=this.editorInstance.config;this.actualConfig=c?JSON.parse(c):JSON.parse(JSON.stringify(this.originalConfig));if(!this.actualConfig.toolbarGroups&&
6!this.actualConfig.toolbar){for(var a=this.actualConfig,d=this.editorInstance.toolbar,g=[],f=d.length,k=0;k<f;k++){var h=d[k];"string"==typeof h?g.push(h):g.push({name:h.name,groups:h.groups?h.groups.slice():[]})}a.toolbarGroups=g}"function"===typeof b&&b(this.mainContainer)};a.prototype._createModifier=function(){this.mainContainer.addClass("unselectable");this.modifyContainer&&this.modifyContainer.remove();this.modifyContainer=new CKEDITOR.dom.element("div");this.modifyContainer.addClass("toolbarModifier");
7this.mainContainer.append(this.modifyContainer);return this.mainContainer};a.prototype.getEditableArea=function(){return this.editorInstance.container.findOne("#"+this.editorInstance.id+"_contents")};a.prototype._hideEditable=function(){var b=this.getEditableArea();this.isEditableVisible=!1;this.lastEditableAreaHeight=b.getStyle("height");b.setStyle("height","0")};a.prototype._showEditable=function(){this.isEditableVisible=!0;this.getEditableArea().setStyle("height",this.lastEditableAreaHeight||"auto")};
8a.prototype._toggleEditable=function(){this.isEditableVisible?this._hideEditable():this._showEditable()};a.prototype._refreshEditor=function(){function b(){c.editorInstance.destroy();c._createEditor(!0,c.getActualConfig());c.waitForReady=!1}var c=this,a=this.editorInstance.status;this.waitForReady||("unloaded"==a||"loaded"==a?(this.waitForReady=!0,this.editorInstance.once("instanceReady",function(){b()},this)):b())};a.prototype._createEditor=function(b,c){function e(){}var d=this;this.editorInstance=
9CKEDITOR.replace(this.editorId);this.editorInstance.on("configLoaded",function(){var b=d.editorInstance.config;c&&CKEDITOR.tools.extend(b,c,!0);a.extendPluginsConfig(b)});this.editorInstance.on("uiSpace",function(b){"top"!=b.data.space&&b.stop()},null,null,-999);this.editorInstance.once("loaded",function(){var c=d.editorInstance.ui.instances,a;for(a in c)c[a]&&(c[a].click=e,c[a].onClick=e);d.isEditableVisible||d._hideEditable();d.currentActive&&d.currentActive.name&&d._highlightGroup(d.currentActive.name);
10d.hidden?d.hideUI():d.showUI();if(b&&"function"===typeof d.onRefresh)d.onRefresh()})};a.prototype.getActualConfig=function(){return JSON.parse(JSON.stringify(this.actualConfig))};a.prototype._createToolbar=function(){if(this.toolbarButtons.length){this.toolbarContainer=new CKEDITOR.dom.element("div");this.toolbarContainer.addClass("toolbar");for(var b=this.toolbarButtons.length,c=0;c<b;c+=1)this._createToolbarBtn(this.toolbarButtons[c])}};a.prototype._createToolbarBtn=function(b){var c=ToolbarConfigurator.FullToolbarEditor.createButton("string"===
11typeof b.text?b.text:b.text.inactive,b.cssClass);this.toolbarContainer.append(c);c.data("group",b.group);c.addClass(b.position);c.on("click",function(){b.clickCallback.call(this,c,b)},this);return c};a.prototype._fixGroups=function(b){b=b.toolbarGroups||[];for(var c=b.length,a=0;a<c;a+=1){var d=b[a];"/"==d?(d=b[a]={},d.type="separator",d.name="separator"+CKEDITOR.tools.getNextNumber()):(d.groups=d.groups||[],-1==CKEDITOR.tools.indexOf(d.groups,d.name)&&(this.editorInstance.ui.addToolbarGroup(d.name,
12d.groups[d.groups.length-1],d.name),d.groups.push(d.name)),this._fixSubgroups(d))}};a.prototype._fixSubgroups=function(b){b=b.groups;for(var c=b.length,a=0;a<c;a+=1){var d=b[a];b[a]={name:d,totalBtns:ToolbarConfigurator.ToolbarModifier.getTotalSubGroupButtonsNumber(d,this.fullToolbarEditor)}}};a.stringifyJSONintoOneLine=function(b,a){a=a||{};var e=JSON.stringify(b,null,""),e=e.replace(/\n/g,"");a.addSpaces&&(e=e.replace(/(\{|:|,|\[|\])/g,function(a){return a+" "}),e=e.replace(/(\])/g,function(a){return" "+
13a}));a.noQuotesOnKey&&(e=e.replace(/"(\w*)":/g,function(a,b){return b+":"}));a.singleQuotes&&(e=e.replace(/\"/g,"'"));return e};a.prototype.hideUI=function(){this.hidden=!0;this.mainContainer.hide();this.editorInstance.container&&this.editorInstance.container.hide()};a.prototype.showUI=function(){this.hidden=!1;this.mainContainer.show();this.editorInstance.container&&this.editorInstance.container.show()};a.extendPluginsConfig=function(a){var c=a.extraPlugins;a.extraPlugins=(c?c+",":"")+"toolbarconfiguratorarea"}})(); \ No newline at end of file
diff --git a/release/samples/toolbarconfigurator/js/fulltoolbareditor.js b/release/samples/toolbarconfigurator/js/fulltoolbareditor.js
new file mode 100644
index 0000000..dc19bee
--- /dev/null
+++ b/release/samples/toolbarconfigurator/js/fulltoolbareditor.js
@@ -0,0 +1,9 @@
1window.ToolbarConfigurator={};
2(function(){function e(){this.instanceid="fte"+CKEDITOR.tools.getNextId();this.textarea=new CKEDITOR.dom.element("textarea");this.textarea.setAttributes({id:this.instanceid,name:this.instanceid,contentEditable:!0});this.editorInstance=this.buttons=null}ToolbarConfigurator.FullToolbarEditor=e;e.prototype.init=function(b){var a=this;document.body.appendChild(this.textarea.$);CKEDITOR.replace(this.instanceid);this.editorInstance=CKEDITOR.instances[this.instanceid];this.editorInstance.once("configLoaded",function(d){var c=
3d.editor.config;delete c.removeButtons;delete c.toolbarGroups;delete c.toolbar;ToolbarConfigurator.AbstractToolbarModifier.extendPluginsConfig(c);d.editor.once("loaded",function(){a.buttons=e.toolbarToButtons(a.editorInstance.toolbar);a.buttonsByGroup=e.groupButtons(a.buttons);a.buttonNamesByGroup=a.groupButtonNamesByGroup(a.buttons);d.editor.container.hide();"function"===typeof b&&b(a.buttons)})})};e.prototype.groupButtonNamesByGroup=function(b){var a=this;b=e.groupButtons(b);for(var d in b)b[d]=
4e.map(b[d],function(b){return a.getCamelCasedButtonName(b.name)});return b};e.prototype.getGroupByName=function(b){for(var a=this.editorInstance.config.toolbarGroups||this.getFullToolbarGroupsConfig(),d=a.length,c=0;c<d;c+=1)if(a[c].name===b)return a[c];return null};e.prototype.getCamelCasedButtonName=function(b){var a=this.editorInstance.ui.items,d;for(d in a)if(a[d].name==b)return d;return null};e.prototype.getFullToolbarGroupsConfig=function(b){b=!0===b?!0:!1;for(var a=[],d=this.editorInstance.toolbar,
5c=d.length,f=0;f<c;f+=1){var e=d[f],g={};"string"!=typeof e.name?b&&a.push("/"):(g.name=e.name,e.groups&&(g.groups=Array.prototype.slice.call(e.groups)),a.push(g))}return a};e.filter=function(b,a){for(var d=b&&b.length?b.length:0,c=[],f=0;f<d;f+=1)a(b[f])&&c.push(b[f]);return c};e.map=function(b,a){var d;if(CKEDITOR.tools.isArray(b)){d=[];for(var c=b.length,f=0;f<c;f+=1)d.push(a(b[f]))}else for(c in d={},b)d[c]=a(b[c]);return d};e.groupButtons=function(b){for(var a={},d=b.length,c=0;c<d;c+=1){var f=
6b[c],e=f.toolbar.split(",")[0];a[e]=a[e]||[];a[e].push(f)}return a};e.toolbarToButtons=function(b){for(var a=[],d=b.length,c=0;c<d;c+=1)"object"==typeof b[c]&&(a=a.concat(e.groupToButtons(b[c])));return a};e.createToolbarButton=function(b){var a=new CKEDITOR.dom.element("a"),d=e.createIcon(b.name,b.icon,b.command);a.setStyle("float","none");a.addClass("cke_"+("rtl"==CKEDITOR.lang.dir?"rtl":"ltr"));if(b instanceof CKEDITOR.ui.button)a.addClass("cke_button"),a.addClass("cke_toolgroup"),a.append(d);
7else if(CKEDITOR.ui.richCombo&&b instanceof CKEDITOR.ui.richCombo){var d=new CKEDITOR.dom.element("span"),c=new CKEDITOR.dom.element("span"),f=new CKEDITOR.dom.element("span");a.addClass("cke_combo_button");d.addClass("cke_combo_text");d.addClass("cke_combo_inlinelabel");d.setText(b.label);c.addClass("cke_combo_open");f.addClass("cke_combo_arrow");c.append(f);a.append(d);a.append(c)}return a};e.createIcon=function(b,a,d){var c=CKEDITOR.skin.getIconStyle(b,"rtl"==CKEDITOR.lang.dir),c=(c=c||CKEDITOR.skin.getIconStyle(a,
8"rtl"==CKEDITOR.lang.dir))||CKEDITOR.skin.getIconStyle(d,"rtl"==CKEDITOR.lang.dir);a=new CKEDITOR.dom.element("span");a.addClass("cke_button_icon");a.addClass("cke_button__"+b+"_icon");a.setAttribute("style",c);a.setStyle("float","none");return a};e.createButton=function(b,a){var d=new CKEDITOR.dom.element("button");d.addClass("button-a");d.setAttribute("type","button");if("string"==typeof a){a=a.split(" ");for(var c=a.length;c--;)d.addClass(a[c])}d.setHtml(b);return d};e.groupToButtons=function(b){for(var a=
9[],d=(b=b.items)?b.length:0,c=0;c<d;c+=1){var f=b[c];if(f instanceof CKEDITOR.ui.button||CKEDITOR.ui.richCombo&&f instanceof CKEDITOR.ui.richCombo)f.$=e.createToolbarButton(f),a.push(f)}return a}})(); \ No newline at end of file
diff --git a/release/samples/toolbarconfigurator/js/toolbarmodifier.js b/release/samples/toolbarconfigurator/js/toolbarmodifier.js
new file mode 100644
index 0000000..9731818
--- /dev/null
+++ b/release/samples/toolbarconfigurator/js/toolbarmodifier.js
@@ -0,0 +1,33 @@
1(function(){function d(a,b){l.call(this,a,b);this.actualConfig=this.originalConfig=this.removedButtons=null;this.emptyVisible=!1;this.state="edit";this.toolbarButtons=[{text:{active:"Hide empty toolbar groups",inactive:"Show empty toolbar groups"},group:"edit",position:"left",cssClass:"button-a-soft",clickCallback:function(a,b){a[a.hasClass("button-a-background")?"removeClass":"addClass"]("button-a-background");this._toggleVisibilityEmptyElements();this.emptyVisible?a.setText(b.text.active):a.setText(b.text.inactive)}},
2{text:"Add row separator",group:"edit",position:"left",cssClass:"button-a-soft",clickCallback:function(){this._addSeparator()}},{text:"Select config",group:"config",position:"left",cssClass:"button-a-soft",clickCallback:function(){this.configContainer.findOne("textarea").$.select()}},{text:"Back to configurator",group:"config",position:"right",cssClass:"button-a-background",clickCallback:function(){if("paste"===this.state){var a=this.configContainer.findOne("textarea").getValue();(a=d.evaluateToolbarGroupsConfig(a))?
3this.setConfig(a):alert("Your pasted config is wrong.")}this.state="edit";this._showConfigurationTool();this.showToolbarBtnsByGroupName(this.state)}},{text:'Get toolbar \x3cspan class\x3d"highlight"\x3econfig\x3c/span\x3e',group:"edit",position:"right",cssClass:"button-a-background icon-pos-left icon-download",clickCallback:function(){this.state="config";this._showConfig();this.showToolbarBtnsByGroupName(this.state)}}];this.cachedActiveElement=null}var l=ToolbarConfigurator.AbstractToolbarModifier;
4ToolbarConfigurator.ToolbarModifier=d;d.prototype=Object.create(ToolbarConfigurator.AbstractToolbarModifier.prototype);d.prototype.getActualConfig=function(){var a=l.prototype.getActualConfig.call(this);if(a.toolbarGroups)for(var b=a.toolbarGroups.length,c=0;c<b;c+=1)a.toolbarGroups[c]=d.parseGroupToConfigValue(a.toolbarGroups[c]);return a};d.prototype._onInit=function(a,b,c){c=!0===c;l.prototype._onInit.call(this,void 0,b);this.removedButtons=[];c?this.removedButtons=this.actualConfig.removeButtons?
5this.actualConfig.removeButtons.split(","):[]:"removeButtons"in this.originalConfig?this.removedButtons=this.originalConfig.removeButtons?this.originalConfig.removeButtons.split(","):[]:(this.originalConfig.removeButtons="",this.removedButtons=[]);this.actualConfig.toolbarGroups||(this.actualConfig.toolbarGroups=this.fullToolbarEditor.getFullToolbarGroupsConfig());this._fixGroups(this.actualConfig);this._calculateTotalBtns();this._createModifier();this._refreshMoveBtnsAvalibility();this._refreshBtnTabIndexes();
6"function"===typeof a&&a(this.mainContainer)};d.prototype._showConfigurationTool=function(){this.configContainer.addClass("hidden");this.modifyContainer.removeClass("hidden")};d.prototype._showConfig=function(){var a=this.getActualConfig(),b,c;if(a.toolbarGroups){b=a.toolbarGroups;for(var e=this.cfg.trimEmptyGroups,f=[],g=b.length,m=0;m<g;m++){var h=b[m];if("/"===h)f.push("'/'");else{if(e)for(var k=h.groups.length;k--;)0===d.getTotalSubGroupButtonsNumber(h.groups[k],this.fullToolbarEditor)&&h.groups.splice(k,
71);e&&0===h.groups.length||f.push(l.stringifyJSONintoOneLine(h,{addSpaces:!0,noQuotesOnKey:!0,singleQuotes:!0}))}}b="\n\t\t"+f.join(",\n\t\t")}a.removeButtons&&(c=a.removeButtons);a=['\x3ctextarea class\x3d"configCode" readonly\x3eCKEDITOR.editorConfig \x3d function( config ) {\n',b?"\tconfig.toolbarGroups \x3d ["+b+"\n\t];":"",c?"\n\n":"",c?"\tconfig.removeButtons \x3d '"+c+"';":"","\n};\x3c/textarea\x3e"].join("");this.modifyContainer.addClass("hidden");this.configContainer.removeClass("hidden");
8this.configContainer.setHtml(a)};d.prototype._toggleVisibilityEmptyElements=function(){this.modifyContainer.hasClass("empty-visible")?(this.modifyContainer.removeClass("empty-visible"),this.emptyVisible=!1):(this.modifyContainer.addClass("empty-visible"),this.emptyVisible=!0);this._refreshMoveBtnsAvalibility()};d.prototype._createModifier=function(){function a(){b._highlightGroup(this.data("name"))}var b=this;l.prototype._createModifier.call(this);this.modifyContainer.setHtml(this._toolbarConfigToListString());
9var c=this.modifyContainer.find('li[data-type\x3d"group"]');this.modifyContainer.on("mouseleave",function(){this._dehighlightActiveToolGroup()},this);for(var e=c.count(),f=0;f<e;f+=1)c.getItem(f).on("mouseenter",a);CKEDITOR.document.on("keypress",function(a){a=a.data.$.keyCode;a=32===a||13===a;var c=new CKEDITOR.dom.element(CKEDITOR.document.$.activeElement);c.getAscendant(function(a){return a.$===b.mainContainer.$})&&a&&"button"===c.data("type")&&c.findOne("input").$.click()});this.modifyContainer.on("click",
10function(a){var c=a.data.$,e=new CKEDITOR.dom.element(c.target||c.srcElement);if(a=d.getGroupOrSeparatorLiAncestor(e)){b.cachedActiveElement=document.activeElement;if(e.$ instanceof HTMLInputElement)b._handleCheckboxClicked(e);else if(e.$ instanceof HTMLButtonElement&&(c.preventDefault?c.preventDefault():c.returnValue=!1,(c=b._handleAnchorClicked(e.$))&&"remove"==c.action))return;c=a.data("type");a=a.data("name");b._setActiveElement(c,a);b.cachedActiveElement&&b.cachedActiveElement.focus()}});this.toolbarContainer||
11(this._createToolbar(),this.toolbarContainer.insertBefore(this.mainContainer.getChildren().getItem(0)));this.showToolbarBtnsByGroupName("edit");this.configContainer||(this.configContainer=new CKEDITOR.dom.element("div"),this.configContainer.addClass("configContainer"),this.configContainer.addClass("hidden"),this.mainContainer.append(this.configContainer));return this.mainContainer};d.prototype.showToolbarBtnsByGroupName=function(a){if(this.toolbarContainer)for(var b=this.toolbarContainer.find("button"),
12c=b.count(),e=0;e<c;e+=1){var d=b.getItem(e);d.data("group")==a?d.removeClass("hidden"):d.addClass("hidden")}};d.parseGroupToConfigValue=function(a){if("separator"==a.type)return"/";var b=a.groups,c=b.length;delete a.totalBtns;for(var e=0;e<c;e+=1)b[e]=b[e].name;return a};d.getGroupOrSeparatorLiAncestor=function(a){return a.$ instanceof HTMLLIElement&&"group"==a.data("type")?a:d.getFirstAncestor(a,function(a){a=a.data("type");return"group"==a||"separator"==a})};d.prototype._setActiveElement=function(a,
13b){this.currentActive&&this.currentActive.elem.removeClass("active");if(null===a)this._dehighlightActiveToolGroup(),this.currentActive=null;else{var c=this.mainContainer.findOne('ul[data-type\x3dtable-body] li[data-type\x3d"'+a+'"][data-name\x3d"'+b+'"]');c.addClass("active");this.currentActive={type:a,name:b,elem:c};"group"==a&&this._highlightGroup(b);"separator"==a&&this._dehighlightActiveToolGroup()}};d.prototype.getActiveToolGroup=function(){return this.editorInstance.container?this.editorInstance.container.findOne(".cke_toolgroup.active, .cke_toolbar.active"):
14null};d.prototype._dehighlightActiveToolGroup=function(){var a=this.getActiveToolGroup();a&&a.removeClass("active");this.editorInstance.container&&this.editorInstance.container.removeClass("some-toolbar-active")};d.prototype._highlightGroup=function(a){this.editorInstance.container&&(a=this.getFirstEnabledButtonInGroup(a),a=this.editorInstance.container.findOne(".cke_button__"+a+", .cke_combo__"+a),this._dehighlightActiveToolGroup(),this.editorInstance.container&&this.editorInstance.container.addClass("some-toolbar-active"),
15a&&(a=d.getFirstAncestor(a,function(a){return a.hasClass("cke_toolbar")}))&&a.addClass("active"))};d.prototype.getFirstEnabledButtonInGroup=function(a){var b=this.actualConfig.toolbarGroups;a=this.getGroupIndex(a);b=b[a];if(-1===a)return null;a=b.groups?b.groups.length:0;for(var c=0;c<a;c+=1){var e=this.getFirstEnabledButtonInSubgroup(b.groups[c].name);if(e)return e}return null};d.prototype.getFirstEnabledButtonInSubgroup=function(a){for(var b=(a=this.fullToolbarEditor.buttonsByGroup[a])?a.length:
160,c=0;c<b;c+=1){var e=a[c].name;if(!this.isButtonRemoved(e))return e}return null};d.prototype._handleCheckboxClicked=function(a){var b=a.getAscendant("li").data("name");a.$.checked?this._removeButtonFromRemoved(b):this._addButtonToRemoved(b)};d.prototype._handleAnchorClicked=function(a){a=new CKEDITOR.dom.element(a);var b=a.getAscendant("li"),c=b.getAscendant("ul"),e=b.data("type"),d=b.data("name"),g=a.data("direction"),m="up"===g?b.getPrevious():b.getNext(),h;if(a.hasClass("disabled"))return null;
17if(a.hasClass("remove"))return b.remove(),this._removeSeparator(b.data("name")),this._setActiveElement(null),{action:"remove"};if(!a.hasClass("move")||!m)return{action:null};if("group"===e||"separator"===e)h=this._moveGroup(g,d);"subgroup"===e&&(h=b.getAscendant("li").data("name"),h=this._moveSubgroup(g,h,d));"up"===g&&b.insertBefore(c.getChild(h));"down"===g&&b.insertAfter(c.getChild(h));for(var k;b="up"===g?b.getPrevious():b.getNext();)if(this.emptyVisible||!b.hasClass("empty")){k=b;break}k||(k=
18'[data-direction\x3d"'+("up"===g?"down":"up")+'"]',this.cachedActiveElement=a.getParent().findOne(k));this._refreshMoveBtnsAvalibility();this._refreshBtnTabIndexes();return{action:"move"}};d.prototype._refreshMoveBtnsAvalibility=function(){function a(a){var c=a.count();for(d=0;d<c;d+=1)b._disableElementsInList(a.getItem(d))}for(var b=this,c=this.mainContainer.find("ul[data-type\x3dtable-body] li \x3e p \x3e span \x3e button.move.disabled"),e=c.count(),d=0;d<e;d+=1)c.getItem(d).removeClass("disabled");
19a(this.mainContainer.find("ul[data-type\x3dtable-body]"));a(this.mainContainer.find("ul[data-type\x3dtable-body] \x3e li \x3e ul"))};d.prototype._refreshBtnTabIndexes=function(){for(var a=this.mainContainer.find('[data-tab\x3d"true"]'),b=a.count(),c=0;c<b;c++){var e=a.getItem(c),d=e.hasClass("disabled");e.setAttribute("tabindex",d?-1:c)}};d.prototype._disableElementsInList=function(a){function b(a){return!a.hasClass("empty")}if(a.getChildren().count()){var c;this.emptyVisible?(c=a.getFirst(),a=a.getLast()):
20(c=a.getFirst(b),a=a.getLast(b));if(c)var e=c.findOne('p button[data-direction\x3d"up"]');if(a)var d=a.findOne('p button[data-direction\x3d"down"]');e&&(e.addClass("disabled"),e.setAttribute("tabindex","-1"));d&&(d.addClass("disabled"),d.setAttribute("tabindex","-1"))}};d.prototype.getGroupIndex=function(a){for(var b=this.actualConfig.toolbarGroups,c=b.length,d=0;d<c;d+=1)if(b[d].name===a)return d;return-1};d.prototype._addSeparator=function(){var a=this._determineSeparatorToAddIndex(),b=d.createSeparatorLiteral(),
21c=CKEDITOR.dom.element.createFromHtml(d.getToolbarSeparatorString(b));this.actualConfig.toolbarGroups.splice(a,0,b);c.insertBefore(this.modifyContainer.findOne("ul[data-type\x3dtable-body]").getChild(a));this._setActiveElement("separator",b.name);this._refreshMoveBtnsAvalibility();this._refreshBtnTabIndexes();this._refreshEditor()};d.prototype._removeSeparator=function(a){var b=CKEDITOR.tools.indexOf(this.actualConfig.toolbarGroups,function(b){return"separator"==b.type&&b.name==a});this.actualConfig.toolbarGroups.splice(b,
221);this._refreshMoveBtnsAvalibility();this._refreshBtnTabIndexes();this._refreshEditor()};d.prototype._determineSeparatorToAddIndex=function(){return this.currentActive?("group"==this.currentActive.elem.data("type")||"separator"==this.currentActive.elem.data("type")?this.currentActive.elem:this.currentActive.elem.getAscendant("li")).getIndex():0};d.prototype._moveElement=function(a,b,c){function e(a){return a.totalBtns||"separator"==a.type}c=this.emptyVisible?"down"==c?b+1:b-1:d.getFirstElementIndexWith(a,
23b,c,e);return d.moveTo(c-b,a,b)};d.prototype._moveGroup=function(a,b){var c=this.getGroupIndex(b),c=this._moveElement(this.actualConfig.toolbarGroups,c,a);this._refreshMoveBtnsAvalibility();this._refreshBtnTabIndexes();this._refreshEditor();return c};d.prototype._moveSubgroup=function(a,b,c){b=this.getGroupIndex(b);b=this.actualConfig.toolbarGroups[b];var d=CKEDITOR.tools.indexOf(b.groups,function(a){return a.name==c});a=this._moveElement(b.groups,d,a);this._refreshEditor();return a};d.prototype._calculateTotalBtns=
24function(){for(var a=this.actualConfig.toolbarGroups,b=a.length;b--;){var c=a[b],e=d.getTotalGroupButtonsNumber(c,this.fullToolbarEditor);"separator"!=c.type&&(c.totalBtns=e)}};d.prototype._addButtonToRemoved=function(a){if(-1!=CKEDITOR.tools.indexOf(this.removedButtons,a))throw"Button already added to removed";this.removedButtons.push(a);this.actualConfig.removeButtons=this.removedButtons.join(",");this._refreshEditor()};d.prototype._removeButtonFromRemoved=function(a){a=CKEDITOR.tools.indexOf(this.removedButtons,
25a);if(-1===a)throw"Trying to remove button from removed, but not found";this.removedButtons.splice(a,1);this.actualConfig.removeButtons=this.removedButtons.join(",");this._refreshEditor()};d.parseGroupToConfigValue=function(a){if("separator"==a.type)return"/";var b=a.groups,c=b.length;delete a.totalBtns;for(var d=0;d<c;d+=1)b[d]=b[d].name;return a};d.getGroupOrSeparatorLiAncestor=function(a){return a.$ instanceof HTMLLIElement&&"group"==a.data("type")?a:d.getFirstAncestor(a,function(a){a=a.data("type");
26return"group"==a||"separator"==a})};d.createSeparatorLiteral=function(){return{type:"separator",name:"separator"+CKEDITOR.tools.getNextNumber()}};d.prototype._toolbarConfigToListString=function(){for(var a=this.actualConfig.toolbarGroups||[],b='\x3cul data-type\x3d"table-body"\x3e',c=a.length,e=0;e<c;e+=1)var f=a[e],b="separator"===f.type?b+d.getToolbarSeparatorString(f):b+this._getToolbarGroupString(f);b+="\x3c/ul\x3e";return d.getToolbarHeaderString()+b};d.prototype._getToolbarGroupString=function(a){var b=
27a.groups,c;c=""+['\x3cli data-type\x3d"group" data-name\x3d"',a.name,'" ',a.totalBtns?"":'class\x3d"empty"',"\x3e"].join("");c+=d.getToolbarElementPreString(a)+"\x3cul\x3e";a=b.length;for(var e=0;e<a;e+=1){var f=b[e];c+=this._getToolbarSubgroupString(f,this.fullToolbarEditor.buttonsByGroup[f.name])}return c+"\x3c/ul\x3e\x3c/li\x3e"};d.getToolbarSeparatorString=function(a){return['\x3cli data-type\x3d"',a.type,'" data-name\x3d"',a.name,'"\x3e',d.getToolbarElementPreString("row separator"),"\x3c/li\x3e"].join("")};
28d.getToolbarHeaderString=function(){return'\x3cul data-type\x3d"table-header"\x3e\x3cli data-type\x3d"header"\x3e\x3cp\x3eToolbars\x3c/p\x3e\x3cul\x3e\x3cli\x3e\x3cp\x3eToolbar groups\x3c/p\x3e\x3cp\x3eToolbar group items\x3c/p\x3e\x3c/li\x3e\x3c/ul\x3e\x3c/li\x3e\x3c/ul\x3e'};d.getFirstAncestor=function(a,b){for(var c=a.getParents(),d=c.length;d--;)if(b(c[d]))return c[d];return null};d.getFirstElementIndexWith=function(a,b,c,d){for(;"up"===c?b--:++b<a.length;)if(d(a[b]))return b;return-1};d.moveTo=
29function(a,b,c){var d;-1!==c&&(d=b.splice(c,1)[0]);a=c+a;b.splice(a,0,d);return a};d.getTotalSubGroupButtonsNumber=function(a,b){var c=b.buttonsByGroup["string"==typeof a?a:a.name];return c?c.length:0};d.getTotalGroupButtonsNumber=function(a,b){for(var c=0,e=a.groups,f=e?e.length:0,g=0;g<f;g+=1)c+=d.getTotalSubGroupButtonsNumber(e[g],b);return c};d.prototype._getToolbarSubgroupString=function(a,b){var c;c=""+['\x3cli data-type\x3d"subgroup" data-name\x3d"',a.name,'" ',a.totalBtns?"":'class\x3d"empty" ',
30"\x3e"].join("");c+=d.getToolbarElementPreString(a.name);c+="\x3cul\x3e";for(var e=b?b.length:0,f=0;f<e;f+=1)c+=this.getButtonString(b[f]);return c+="\x3c/ul\x3e\x3c/li\x3e"};d.prototype._getConfigButtonName=function(a){var b=this.fullToolbarEditor.editorInstance.ui.items,c;for(c in b)if(b[c].name==a)return c;return null};d.prototype.isButtonRemoved=function(a){return-1!=CKEDITOR.tools.indexOf(this.removedButtons,this._getConfigButtonName(a))};d.prototype.getButtonString=function(a){var b=this.isButtonRemoved(a.name)?
31"":'checked\x3d"checked"';return['\x3cli data-tab\x3d"true" data-type\x3d"button" data-name\x3d"',this._getConfigButtonName(a.name),'"\x3e\x3clabel title\x3d"',a.label,'" \x3e\x3cinput tabindex\x3d"-1"type\x3d"checkbox"',b,"/\x3e",a.$.getOuterHtml(),"\x3c/label\x3e\x3c/li\x3e"].join("")};d.getToolbarElementPreString=function(a){a=a.name?a.name:a;return['\x3cp\x3e\x3cspan\x3e\x3cbutton title\x3d"Move element upward" data-tab\x3d"true" data-direction\x3d"up" class\x3d"move icon-up-big"\x3e\x3c/button\x3e\x3cbutton title\x3d"Move element downward" data-tab\x3d"true" data-direction\x3d"down" class\x3d"move icon-down-big"\x3e\x3c/button\x3e',
32"row separator"==a?'\x3cbutton title\x3d"Remove element" data-tab\x3d"true" class\x3d"remove icon-trash"\x3e\x3c/button\x3e':"",a,"\x3c/span\x3e\x3c/p\x3e"].join("")};d.evaluateToolbarGroupsConfig=function(a){return a=function(a){var c={},d;try{d=eval("("+a+")")}catch(f){try{d=eval(a)}catch(g){return null}}return c.toolbarGroups&&"number"===typeof c.toolbarGroups.length?JSON.stringify(c):d&&"number"===typeof d.length?JSON.stringify({toolbarGroups:d}):d&&d.toolbarGroups?JSON.stringify(d):null}(a)};
33return d})(); \ No newline at end of file
diff --git a/release/samples/toolbarconfigurator/js/toolbartextmodifier.js b/release/samples/toolbarconfigurator/js/toolbartextmodifier.js
new file mode 100644
index 0000000..b9ef46b
--- /dev/null
+++ b/release/samples/toolbarconfigurator/js/toolbartextmodifier.js
@@ -0,0 +1,14 @@
1(function(){function e(a){l.call(this,a);this.hintContainer=this.codeContainer=null}var l=ToolbarConfigurator.AbstractToolbarModifier,g=ToolbarConfigurator.FullToolbarEditor;ToolbarConfigurator.ToolbarTextModifier=e;e.prototype=Object.create(l.prototype);e.prototype._onInit=function(a,d){l.prototype._onInit.call(this,void 0,d);this._createModifier(d?this.actualConfig:void 0);"function"===typeof a&&a(this.mainContainer)};e.prototype._createModifier=function(a){function d(a){var b=c(a);if(null!==b.charsBetween){var d=
2k.getUnusedButtonsArray(k.actualConfig.toolbar,!0,b.charsBetween),e=a.getCursor(),b=CodeMirror.Pos(e.line,e.ch-b.charsBetween.length),h=a.getTokenAt(e);"{"===a.getTokenAt({line:e.line,ch:h.start}).string&&(d=["name"]);if(0!==d.length)return new f(b,e,d)}}function f(a,c,b){this.from=a;this.to=c;this.list=b;this._handlers=[]}function c(a,c){var b={};b.cur=a.getCursor();b.tok=a.getTokenAt(b.cur);b["char"]=c||b.tok.string.charAt(b.tok.string.length-1);var d=a.getRange(CodeMirror.Pos(b.cur.line,0),b.cur).split("").reverse().join(""),
3d=d.replace(/(['|"]\w*['|"])/g,"");b.charsBetween=d.match(/(^\w*)(['|"])/);b.charsBetween&&(b.endChar=b.charsBetween[2],b.charsBetween=b.charsBetween[1].split("").reverse().join(""));return b}function b(a){setTimeout(function(){a.state.completionActive||CodeMirror.showHint(a,d,{hintsClass:"toolbar-modifier",completeSingle:!1})},100);return CodeMirror.Pass}var k=this;this._createToolbar();this.toolbarContainer&&this.mainContainer.append(this.toolbarContainer);l.prototype._createModifier.call(this);
4this._setupActualConfig(a);a=this.actualConfig.toolbar;a=CKEDITOR.tools.isArray(a)?"\tconfig.toolbar \x3d "+("[\n\t\t"+g.map(a,function(a){return l.stringifyJSONintoOneLine(a,{addSpaces:!0,noQuotesOnKey:!0,singleQuotes:!0})}).join(",\n\t\t")+"\n\t]")+";":"config.toolbar \x3d [];";a=["CKEDITOR.editorConfig \x3d function( config ) {\n",a,"\n};"].join("");var e=new CKEDITOR.dom.element("div");e.addClass("codemirror-wrapper");this.modifyContainer.append(e);this.codeContainer=CodeMirror(e.$,{mode:{name:"javascript",
5json:!0},lineNumbers:!1,lineWrapping:!0,viewportMargin:Infinity,value:a,smartIndent:!1,indentWithTabs:!0,indentUnit:4,tabSize:4,theme:"neo",extraKeys:{Left:b,Right:b,"'''":b,"'\"'":b,Backspace:b,Delete:b,"Shift-Tab":"indentLess"}});this.codeContainer.on("endCompletion",function(a,b){var d=c(a);void 0!==b&&a.replaceSelection(d.endChar)});this.codeContainer.on("change",function(){var a=k.codeContainer.getValue(),a=k._evaluateValue(a);null!==a?(k.actualConfig.toolbar=a.toolbar?a.toolbar:k.actualConfig.toolbar,
6k._fillHintByUnusedElements(),k._refreshEditor(),k.mainContainer.removeClass("invalid")):k.mainContainer.addClass("invalid")});this.hintContainer=new CKEDITOR.dom.element("div");this.hintContainer.addClass("toolbarModifier-hints");this._fillHintByUnusedElements();this.hintContainer.insertBefore(e)};e.prototype._fillHintByUnusedElements=function(){var a=this.getUnusedButtonsArray(this.actualConfig.toolbar,!0),a=this.groupButtonNamesByGroup(a),d=g.map(a,function(a){var b=g.map(a.buttons,function(a){return"\x3ccode\x3e"+
7a+"\x3c/code\x3e "}).join("");return["\x3cdt\x3e\x3ccode\x3e",a.name,"\x3c/code\x3e\x3c/dt\x3e\x3cdd\x3e",b,"\x3c/dd\x3e"].join("")}).join(" "),f='\x3cdt class\x3d"list-header"\x3eToolbar group\x3c/dt\x3e\x3cdd class\x3d"list-header"\x3eUnused items\x3c/dd\x3e';a.length||(f="\x3cp\x3eAll items are in use.\x3c/p\x3e");this.codeContainer.refresh();this.hintContainer.setHtml("\x3ch3\x3eUnused toolbar items\x3c/h3\x3e\x3cdl\x3e"+f+d+"\x3c/dl\x3e")};e.prototype.getToolbarGroupByButtonName=function(a){var d=
8this.fullToolbarEditor.buttonNamesByGroup,f;for(f in d)for(var c=d[f],b=c.length;b--;)if(a===c[b])return f;return null};e.prototype.getUnusedButtonsArray=function(a,d,f){d=!0===d?!0:!1;var c=e.mapToolbarCfgToElementsList(a);a=Object.keys(this.fullToolbarEditor.editorInstance.ui.items);a=g.filter(a,function(a){var d="-"===a;a=void 0===f||0===a.toLowerCase().indexOf(f.toLowerCase());return!d&&a});a=g.filter(a,function(a){return-1==CKEDITOR.tools.indexOf(c,a)});d&&a.sort();return a};e.prototype.groupButtonNamesByGroup=
9function(a){var d=[],f=JSON.parse(JSON.stringify(this.fullToolbarEditor.buttonNamesByGroup)),c;for(c in f){var b=f[c],b=g.filter(b,function(b){return-1!==CKEDITOR.tools.indexOf(a,b)});b.length&&d.push({name:c,buttons:b})}return d};e.mapToolbarCfgToElementsList=function(a){function d(a){return"-"!==a}for(var f=[],c=a.length,b=0;b<c;b+=1)a[b]&&"string"!==typeof a[b]&&(f=f.concat(g.filter(a[b].items,d)));return f};e.prototype._setupActualConfig=function(a){a=a||this.editorInstance.config;CKEDITOR.tools.isArray(a.toolbar)||
10(a.toolbarGroups||(a.toolbarGroups=this.fullToolbarEditor.getFullToolbarGroupsConfig(!0)),this._fixGroups(a),a.toolbar=this._mapToolbarGroupsToToolbar(a.toolbarGroups,this.actualConfig.removeButtons),this.actualConfig.toolbar=a.toolbar,this.actualConfig.removeButtons="")};e.prototype._mapToolbarGroupsToToolbar=function(a,d){d=d||this.editorInstance.config.removedBtns;d="string"==typeof d?d.split(","):[];for(var f=a.length;f--;){var c=this._mapToolbarSubgroup(a[f],d);"separator"===a[f].type?a[f]="/":
11CKEDITOR.tools.isArray(c)&&0===c.length?a.splice(f,1):a[f]="string"==typeof c?c:{name:a[f].name,items:c}}return a};e.prototype._mapToolbarSubgroup=function(a,d){if("string"==typeof a)return a;for(var f=a.groups?a.groups.length:0,c=[],b=0;b<f;b+=1){var e=a.groups[b],e=this.fullToolbarEditor.buttonsByGroup["string"===typeof e?e:e.name]||[],e=this._mapButtonsToButtonsNames(e,d),g=e.length,c=c.concat(e);g&&c.push("-")}"-"==c[c.length-1]&&c.pop();return c};e.prototype._mapButtonsToButtonsNames=function(a,
12d){for(var f=a.length;f--;){var c=a[f],c="string"===typeof c?c:this.fullToolbarEditor.getCamelCasedButtonName(c.name);-1!==CKEDITOR.tools.indexOf(d,c)?a.splice(f,1):a[f]=c}return a};e.prototype._evaluateValue=function(a){var d;try{var f={};Function("var CKEDITOR \x3d {}; "+a+"; return CKEDITOR;")().editorConfig(f);d=f;for(var c=d.toolbar.length;c--;)d.toolbar[c]||d.toolbar.splice(c,1)}catch(b){d=null}return d};e.prototype.mapToolbarToToolbarGroups=function(a){function d(a,b){a=a.slice();for(var d=
13b.length;d--;){var c=a.indexOf(b[d]);-1!==c&&a.splice(c,1)}return a}for(var f={},c=[],b=[],c=a.length,e=0;e<c;e++)if("/"===a[e])b.push("/");else{var g=a[e].items,m={};m.name=a[e].name;m.groups=[];for(var l=g.length,p=0;p<l;p++){var n=g[p];if("-"!==n){var h=this.getToolbarGroupByButtonName(n);-1===m.groups.indexOf(h)&&m.groups.push(h);f[h]=f[h]||{};h=f[h].buttons=f[h].buttons||{};h[n]=h[n]||{used:0,origin:m.name};h[n].used++}}b.push(m)}c=function(a,b){var c=[],e;for(e in a)var f=a[e],g=b[e].slice(),
14c=c.concat(d(g,Object.keys(f.buttons)));return c}(f,this.fullToolbarEditor.buttonNamesByGroup);return{toolbarGroups:b,removeButtons:c.join(",")}};return e})(); \ No newline at end of file
diff --git a/release/samples/toolbarconfigurator/lib/codemirror/LICENSE b/release/samples/toolbarconfigurator/lib/codemirror/LICENSE
new file mode 100644
index 0000000..d21bbea
--- /dev/null
+++ b/release/samples/toolbarconfigurator/lib/codemirror/LICENSE
@@ -0,0 +1,19 @@
1Copyright (C) 2014 by Marijn Haverbeke <marijnh@gmail.com> and others
2
3Permission is hereby granted, free of charge, to any person obtaining a copy
4of this software and associated documentation files (the "Software"), to deal
5in the Software without restriction, including without limitation the rights
6to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7copies of the Software, and to permit persons to whom the Software is
8furnished to do so, subject to the following conditions:
9
10The above copyright notice and this permission notice shall be included in
11all copies or substantial portions of the Software.
12
13THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19THE SOFTWARE.
diff --git a/release/samples/toolbarconfigurator/lib/codemirror/codemirror.css b/release/samples/toolbarconfigurator/lib/codemirror/codemirror.css
new file mode 100644
index 0000000..2fe9d0f
--- /dev/null
+++ b/release/samples/toolbarconfigurator/lib/codemirror/codemirror.css
@@ -0,0 +1,325 @@
1/* BASICS */
2
3.CodeMirror {
4 /* Set height, width, borders, and global font properties here */
5 font-family: monospace;
6 height: 300px;
7 color: black;
8}
9
10/* PADDING */
11
12.CodeMirror-lines {
13 padding: 4px 0; /* Vertical padding around content */
14}
15.CodeMirror pre {
16 padding: 0 4px; /* Horizontal padding of content */
17}
18
19.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
20 background-color: white; /* The little square between H and V scrollbars */
21}
22
23/* GUTTER */
24
25.CodeMirror-gutters {
26 border-right: 1px solid #ddd;
27 background-color: #f7f7f7;
28 white-space: nowrap;
29}
30.CodeMirror-linenumbers {}
31.CodeMirror-linenumber {
32 padding: 0 3px 0 5px;
33 min-width: 20px;
34 text-align: right;
35 color: #999;
36 white-space: nowrap;
37}
38
39.CodeMirror-guttermarker { color: black; }
40.CodeMirror-guttermarker-subtle { color: #999; }
41
42/* CURSOR */
43
44.CodeMirror div.CodeMirror-cursor {
45 border-left: 1px solid black;
46}
47/* Shown when moving in bi-directional text */
48.CodeMirror div.CodeMirror-secondarycursor {
49 border-left: 1px solid silver;
50}
51.CodeMirror.cm-fat-cursor div.CodeMirror-cursor {
52 width: auto;
53 border: 0;
54 background: #7e7;
55}
56.CodeMirror.cm-fat-cursor div.CodeMirror-cursors {
57 z-index: 1;
58}
59
60.cm-animate-fat-cursor {
61 width: auto;
62 border: 0;
63 -webkit-animation: blink 1.06s steps(1) infinite;
64 -moz-animation: blink 1.06s steps(1) infinite;
65 animation: blink 1.06s steps(1) infinite;
66}
67@-moz-keyframes blink {
68 0% { background: #7e7; }
69 50% { background: none; }
70 100% { background: #7e7; }
71}
72@-webkit-keyframes blink {
73 0% { background: #7e7; }
74 50% { background: none; }
75 100% { background: #7e7; }
76}
77@keyframes blink {
78 0% { background: #7e7; }
79 50% { background: none; }
80 100% { background: #7e7; }
81}
82
83/* Can style cursor different in overwrite (non-insert) mode */
84div.CodeMirror-overwrite div.CodeMirror-cursor {}
85
86.cm-tab { display: inline-block; text-decoration: inherit; }
87
88.CodeMirror-ruler {
89 border-left: 1px solid #ccc;
90 position: absolute;
91}
92
93/* DEFAULT THEME */
94
95.cm-s-default .cm-keyword {color: #708;}
96.cm-s-default .cm-atom {color: #219;}
97.cm-s-default .cm-number {color: #164;}
98.cm-s-default .cm-def {color: #00f;}
99.cm-s-default .cm-variable,
100.cm-s-default .cm-punctuation,
101.cm-s-default .cm-property,
102.cm-s-default .cm-operator {}
103.cm-s-default .cm-variable-2 {color: #05a;}
104.cm-s-default .cm-variable-3 {color: #085;}
105.cm-s-default .cm-comment {color: #a50;}
106.cm-s-default .cm-string {color: #a11;}
107.cm-s-default .cm-string-2 {color: #f50;}
108.cm-s-default .cm-meta {color: #555;}
109.cm-s-default .cm-qualifier {color: #555;}
110.cm-s-default .cm-builtin {color: #30a;}
111.cm-s-default .cm-bracket {color: #997;}
112.cm-s-default .cm-tag {color: #170;}
113.cm-s-default .cm-attribute {color: #00c;}
114.cm-s-default .cm-header {color: blue;}
115.cm-s-default .cm-quote {color: #090;}
116.cm-s-default .cm-hr {color: #999;}
117.cm-s-default .cm-link {color: #00c;}
118
119.cm-negative {color: #d44;}
120.cm-positive {color: #292;}
121.cm-header, .cm-strong {font-weight: bold;}
122.cm-em {font-style: italic;}
123.cm-link {text-decoration: underline;}
124.cm-strikethrough {text-decoration: line-through;}
125
126.cm-s-default .cm-error {color: #f00;}
127.cm-invalidchar {color: #f00;}
128
129.CodeMirror-composing { border-bottom: 2px solid; }
130
131/* Default styles for common addons */
132
133div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
134div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
135.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
136.CodeMirror-activeline-background {background: #e8f2ff;}
137
138/* STOP */
139
140/* The rest of this file contains styles related to the mechanics of
141 the editor. You probably shouldn't touch them. */
142
143.CodeMirror {
144 position: relative;
145 overflow: hidden;
146 background: white;
147}
148
149.CodeMirror-scroll {
150 overflow: scroll !important; /* Things will break if this is overridden */
151 /* 30px is the magic margin used to hide the element's real scrollbars */
152 /* See overflow: hidden in .CodeMirror */
153 margin-bottom: -30px; margin-right: -30px;
154 padding-bottom: 30px;
155 height: 100%;
156 outline: none; /* Prevent dragging from highlighting the element */
157 position: relative;
158}
159.CodeMirror-sizer {
160 position: relative;
161 border-right: 30px solid transparent;
162}
163
164/* The fake, visible scrollbars. Used to force redraw during scrolling
165 before actuall scrolling happens, thus preventing shaking and
166 flickering artifacts. */
167.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
168 position: absolute;
169 z-index: 6;
170 display: none;
171}
172.CodeMirror-vscrollbar {
173 right: 0; top: 0;
174 overflow-x: hidden;
175 overflow-y: scroll;
176}
177.CodeMirror-hscrollbar {
178 bottom: 0; left: 0;
179 overflow-y: hidden;
180 overflow-x: scroll;
181}
182.CodeMirror-scrollbar-filler {
183 right: 0; bottom: 0;
184}
185.CodeMirror-gutter-filler {
186 left: 0; bottom: 0;
187}
188
189.CodeMirror-gutters {
190 position: absolute; left: 0; top: 0;
191 z-index: 3;
192}
193.CodeMirror-gutter {
194 white-space: normal;
195 height: 100%;
196 display: inline-block;
197 margin-bottom: -30px;
198 /* Hack to make IE7 behave */
199 *zoom:1;
200 *display:inline;
201}
202.CodeMirror-gutter-wrapper {
203 position: absolute;
204 z-index: 4;
205 height: 100%;
206}
207.CodeMirror-gutter-elt {
208 position: absolute;
209 cursor: default;
210 z-index: 4;
211}
212.CodeMirror-gutter-wrapper {
213 -webkit-user-select: none;
214 -moz-user-select: none;
215 user-select: none;
216}
217
218.CodeMirror-lines {
219 cursor: text;
220 min-height: 1px; /* prevents collapsing before first draw */
221}
222.CodeMirror pre {
223 /* Reset some styles that the rest of the page might have set */
224 -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
225 border-width: 0;
226 background: transparent;
227 font-family: inherit;
228 font-size: inherit;
229 margin: 0;
230 white-space: pre;
231 word-wrap: normal;
232 line-height: inherit;
233 color: inherit;
234 z-index: 2;
235 position: relative;
236 overflow: visible;
237 -webkit-tap-highlight-color: transparent;
238}
239.CodeMirror-wrap pre {
240 word-wrap: break-word;
241 white-space: pre-wrap;
242 word-break: normal;
243}
244
245.CodeMirror-linebackground {
246 position: absolute;
247 left: 0; right: 0; top: 0; bottom: 0;
248 z-index: 0;
249}
250
251.CodeMirror-linewidget {
252 position: relative;
253 z-index: 2;
254 overflow: auto;
255}
256
257.CodeMirror-widget {}
258
259.CodeMirror-code {
260 outline: none;
261}
262
263/* Force content-box sizing for the elements where we expect it */
264.CodeMirror-scroll,
265.CodeMirror-sizer,
266.CodeMirror-gutter,
267.CodeMirror-gutters,
268.CodeMirror-linenumber {
269 -moz-box-sizing: content-box;
270 box-sizing: content-box;
271}
272
273.CodeMirror-measure {
274 position: absolute;
275 width: 100%;
276 height: 0;
277 overflow: hidden;
278 visibility: hidden;
279}
280.CodeMirror-measure pre { position: static; }
281
282.CodeMirror div.CodeMirror-cursor {
283 position: absolute;
284 border-right: none;
285 width: 0;
286}
287
288div.CodeMirror-cursors {
289 visibility: hidden;
290 position: relative;
291 z-index: 3;
292}
293.CodeMirror-focused div.CodeMirror-cursors {
294 visibility: visible;
295}
296
297.CodeMirror-selected { background: #d9d9d9; }
298.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
299.CodeMirror-crosshair { cursor: crosshair; }
300.CodeMirror ::selection { background: #d7d4f0; }
301.CodeMirror ::-moz-selection { background: #d7d4f0; }
302
303.cm-searching {
304 background: #ffa;
305 background: rgba(255, 255, 0, .4);
306}
307
308/* IE7 hack to prevent it from returning funny offsetTops on the spans */
309.CodeMirror span { *vertical-align: text-bottom; }
310
311/* Used to force a border model for a node */
312.cm-force-border { padding-right: .1px; }
313
314@media print {
315 /* Hide the cursor when printing */
316 .CodeMirror div.CodeMirror-cursors {
317 visibility: hidden;
318 }
319}
320
321/* See issue #2901 */
322.cm-tab-wrap-hack:after { content: ''; }
323
324/* Help users use markselection to safely style text background */
325span.CodeMirror-selectedtext { background: none; }
diff --git a/release/samples/toolbarconfigurator/lib/codemirror/codemirror.js b/release/samples/toolbarconfigurator/lib/codemirror/codemirror.js
new file mode 100644
index 0000000..538493f
--- /dev/null
+++ b/release/samples/toolbarconfigurator/lib/codemirror/codemirror.js
@@ -0,0 +1,288 @@
1(function(q){if("object"==typeof exports&&"object"==typeof module)module.exports=q();else{if("function"==typeof define&&define.amd)return define([],q);this.CodeMirror=q()}})(function(){function q(a,b){if(!(this instanceof q))return new q(a,b);this.options=b=b?V(b):{};V(qf,b,!1);wc(b);var c=b.value;"string"==typeof c&&(c=new P(c,b.mode));this.doc=c;var d=new q.inputStyles[b.inputStyle](this),d=this.display=new rf(a,c,d);d.wrapper.CodeMirror=this;Ad(this);Bd(this);b.lineWrapping&&(this.display.wrapper.className+=
2" CodeMirror-wrap");b.autofocus&&!ab&&d.input.focus();Cd(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new bb,keySeq:null,specialChars:null};var e=this;B&&11>C&&setTimeout(function(){e.display.input.reset(!0)},20);sf(this);Dd||(tf(),Dd=!0);Ja(this);this.curOp.forceUpdate=!0;Ed(this,c);b.autofocus&&!ab||e.hasFocus()?setTimeout(cb(xc,this),20):db(this);for(var f in Ka)if(Ka.hasOwnProperty(f))Ka[f](this,
3b[f],Fd);Gd(this);b.finishInit&&b.finishInit(this);for(c=0;c<yc.length;++c)yc[c](this);La(this);J&&b.lineWrapping&&"optimizelegibility"==getComputedStyle(d.lineDiv).textRendering&&(d.lineDiv.style.textRendering="auto")}function rf(a,b,c){this.input=c;this.scrollbarFiller=t("div",null,"CodeMirror-scrollbar-filler");this.scrollbarFiller.setAttribute("cm-not-content","true");this.gutterFiller=t("div",null,"CodeMirror-gutter-filler");this.gutterFiller.setAttribute("cm-not-content","true");this.lineDiv=
4t("div",null,"CodeMirror-code");this.selectionDiv=t("div",null,null,"position: relative; z-index: 1");this.cursorDiv=t("div",null,"CodeMirror-cursors");this.measure=t("div",null,"CodeMirror-measure");this.lineMeasure=t("div",null,"CodeMirror-measure");this.lineSpace=t("div",[this.measure,this.lineMeasure,this.selectionDiv,this.cursorDiv,this.lineDiv],null,"position: relative; outline: none");this.mover=t("div",[t("div",[this.lineSpace],"CodeMirror-lines")],null,"position: relative");this.sizer=t("div",
5[this.mover],"CodeMirror-sizer");this.sizerWidth=null;this.heightForcer=t("div",null,null,"position: absolute; height: "+Hd+"px; width: 1px;");this.gutters=t("div",null,"CodeMirror-gutters");this.lineGutter=null;this.scroller=t("div",[this.sizer,this.heightForcer,this.gutters],"CodeMirror-scroll");this.scroller.setAttribute("tabIndex","-1");this.wrapper=t("div",[this.scrollbarFiller,this.gutterFiller,this.scroller],"CodeMirror");B&&8>C&&(this.gutters.style.zIndex=-1,this.scroller.style.paddingRight=
60);J||wa&&ab||(this.scroller.draggable=!0);a&&(a.appendChild?a.appendChild(this.wrapper):a(this.wrapper));this.reportedViewFrom=this.reportedViewTo=this.viewFrom=this.viewTo=b.first;this.view=[];this.externalMeasured=this.renderedView=null;this.lastWrapHeight=this.lastWrapWidth=this.viewOffset=0;this.updateLineNumbers=null;this.nativeBarWidth=this.barHeight=this.barWidth=0;this.scrollbarsClipped=!1;this.lineNumWidth=this.lineNumInnerWidth=this.lineNumChars=null;this.alignWidgets=!1;this.maxLine=this.cachedCharWidth=
7this.cachedTextHeight=this.cachedPaddingH=null;this.maxLineLength=0;this.maxLineChanged=!1;this.wheelDX=this.wheelDY=this.wheelStartX=this.wheelStartY=null;this.shift=!1;this.activeTouch=this.selForContextMenu=null;c.init(this)}function zc(a){a.doc.mode=q.getMode(a.options,a.doc.modeOption);eb(a)}function eb(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null);a.styles&&(a.styles=null)});a.doc.frontier=a.doc.first;fb(a,100);a.state.modeGen++;a.curOp&&Q(a)}function Id(a){var b=xa(a.display),
8c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/gb(a.display)-3);return function(e){if(ya(a.doc,e))return 0;var f=0;if(e.widgets)for(var g=0;g<e.widgets.length;g++)e.widgets[g].height&&(f+=e.widgets[g].height);return c?f+(Math.ceil(e.text.length/d)||1)*b:f+b}}function Ac(a){var b=a.doc,c=Id(a);b.iter(function(a){var b=c(a);b!=a.height&&ca(a,b)})}function Bd(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g,
9" cm-s-");hb(a)}function ib(a){Ad(a);Q(a);setTimeout(function(){Bc(a)},20)}function Ad(a){var b=a.display.gutters,c=a.options.gutters;za(b);for(var d=0;d<c.length;++d){var e=c[d],f=b.appendChild(t("div",null,"CodeMirror-gutter "+e));"CodeMirror-linenumbers"==e&&(a.display.lineGutter=f,f.style.width=(a.display.lineNumWidth||1)+"px")}b.style.display=d?"":"none";Cc(a)}function Cc(a){a.display.sizer.style.marginLeft=a.display.gutters.offsetWidth+"px"}function Kb(a){if(0==a.height)return 0;for(var b=a.text.length,
10c,d=a;c=Aa(d,!0);)c=c.find(0,!0),d=c.from.line,b+=c.from.ch-c.to.ch;for(d=a;c=Aa(d,!1);)c=c.find(0,!0),b-=d.text.length-c.from.ch,d=c.to.line,b+=d.text.length-c.to.ch;return b}function Dc(a){var b=a.display;a=a.doc;b.maxLine=u(a,a.first);b.maxLineLength=Kb(b.maxLine);b.maxLineChanged=!0;a.iter(function(a){var d=Kb(a);d>b.maxLineLength&&(b.maxLineLength=d,b.maxLine=a)})}function wc(a){var b=D(a.gutters,"CodeMirror-linenumbers");-1==b&&a.lineNumbers?a.gutters=a.gutters.concat(["CodeMirror-linenumbers"]):
11-1<b&&!a.lineNumbers&&(a.gutters=a.gutters.slice(0),a.gutters.splice(b,1))}function jb(a){var b=a.display,c=b.gutters.offsetWidth,d=Math.round(a.doc.height+Ec(a.display));return{clientHeight:b.scroller.clientHeight,viewHeight:b.wrapper.clientHeight,scrollWidth:b.scroller.scrollWidth,clientWidth:b.scroller.clientWidth,viewWidth:b.wrapper.clientWidth,barLeft:a.options.fixedGutter?c:0,docHeight:d,scrollHeight:d+da(a)+b.barHeight,nativeBarWidth:b.nativeBarWidth,gutterWidth:c}}function Fc(a,b,c){this.cm=
12c;var d=this.vert=t("div",[t("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),e=this.horiz=t("div",[t("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a(d);a(e);v(d,"scroll",function(){d.clientHeight&&b(d.scrollTop,"vertical")});v(e,"scroll",function(){e.clientWidth&&b(e.scrollLeft,"horizontal")});this.checkedOverlay=!1;B&&8>C&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")}function Gc(){}function Cd(a){a.display.scrollbars&&(a.display.scrollbars.clear(),
13a.display.scrollbars.addClass&&kb(a.display.wrapper,a.display.scrollbars.addClass));a.display.scrollbars=new q.scrollbarModel[a.options.scrollbarStyle](function(b){a.display.wrapper.insertBefore(b,a.display.scrollbarFiller);v(b,"mousedown",function(){a.state.focused&&setTimeout(function(){a.display.input.focus()},0)});b.setAttribute("cm-not-content","true")},function(b,c){"horizontal"==c?Ma(a,b):lb(a,b)},a);a.display.scrollbars.addClass&&mb(a.display.wrapper,a.display.scrollbars.addClass)}function Na(a,
14b){b||(b=jb(a));var c=a.display.barWidth,d=a.display.barHeight;Jd(a,b);for(var e=0;4>e&&c!=a.display.barWidth||d!=a.display.barHeight;e++)c!=a.display.barWidth&&a.options.lineWrapping&&Lb(a),Jd(a,jb(a)),c=a.display.barWidth,d=a.display.barHeight}function Jd(a,b){var c=a.display,d=c.scrollbars.update(b);c.sizer.style.paddingRight=(c.barWidth=d.right)+"px";c.sizer.style.paddingBottom=(c.barHeight=d.bottom)+"px";d.right&&d.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=
15d.bottom+"px",c.scrollbarFiller.style.width=d.right+"px"):c.scrollbarFiller.style.display="";d.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=d.bottom+"px",c.gutterFiller.style.width=b.gutterWidth+"px"):c.gutterFiller.style.display=""}function Hc(a,b,c){var d=c&&null!=c.top?Math.max(0,c.top):a.scroller.scrollTop,d=Math.floor(d-a.lineSpace.offsetTop),e=c&&null!=c.bottom?c.bottom:d+a.wrapper.clientHeight,d=Ba(b,d),
16e=Ba(b,e);if(c&&c.ensure){var f=c.ensure.from.line;c=c.ensure.to.line;f<d?(d=f,e=Ba(b,ea(u(b,f))+a.wrapper.clientHeight)):Math.min(c,b.lastLine())>=e&&(d=Ba(b,ea(u(b,c))-a.wrapper.clientHeight),e=c)}return{from:d,to:Math.max(e,d+1)}}function Bc(a){var b=a.display,c=b.view;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var d=Ic(b)-b.scroller.scrollLeft+a.doc.scrollLeft,e=b.gutters.offsetWidth,f=d+"px",g=0;g<c.length;g++)if(!c[g].hidden){a.options.fixedGutter&&c[g].gutter&&(c[g].gutter.style.left=
17f);var h=c[g].alignable;if(h)for(var k=0;k<h.length;k++)h[k].style.left=f}a.options.fixedGutter&&(b.gutters.style.left=d+e+"px")}}function Gd(a){if(!a.options.lineNumbers)return!1;var b=a.doc,b=Jc(a.options,b.first+b.size-1),c=a.display;if(b.length!=c.lineNumChars){var d=c.measure.appendChild(t("div",[t("div",b)],"CodeMirror-linenumber CodeMirror-gutter-elt")),e=d.firstChild.offsetWidth,d=d.offsetWidth-e;c.lineGutter.style.width="";c.lineNumInnerWidth=Math.max(e,c.lineGutter.offsetWidth-d)+1;c.lineNumWidth=
18c.lineNumInnerWidth+d;c.lineNumChars=c.lineNumInnerWidth?b.length:-1;c.lineGutter.style.width=c.lineNumWidth+"px";Cc(a);return!0}return!1}function Jc(a,b){return String(a.lineNumberFormatter(b+a.firstLineNumber))}function Ic(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function Mb(a,b,c){var d=a.display;this.viewport=b;this.visible=Hc(d,a.doc,b);this.editorIsHidden=!d.wrapper.offsetWidth;this.wrapperHeight=d.wrapper.clientHeight;this.wrapperWidth=d.wrapper.clientWidth;
19this.oldDisplayWidth=pa(a);this.force=c;this.dims=Kc(a);this.events=[]}function Lc(a,b){var c=a.display,d=a.doc;if(b.editorIsHidden)return qa(a),!1;if(!b.force&&b.visible.from>=c.viewFrom&&b.visible.to<=c.viewTo&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo)&&c.renderedView==c.view&&0==Kd(a))return!1;Gd(a)&&(qa(a),b.dims=Kc(a));var e=d.first+d.size,f=Math.max(b.visible.from-a.options.viewportMargin,d.first),g=Math.min(e,b.visible.to+a.options.viewportMargin);c.viewFrom<f&&20>f-c.viewFrom&&
20(f=Math.max(d.first,c.viewFrom));c.viewTo>g&&20>c.viewTo-g&&(g=Math.min(e,c.viewTo));ra&&(f=Mc(a.doc,f),g=Ld(a.doc,g));d=f!=c.viewFrom||g!=c.viewTo||c.lastWrapHeight!=b.wrapperHeight||c.lastWrapWidth!=b.wrapperWidth;e=a.display;0==e.view.length||f>=e.viewTo||g<=e.viewFrom?(e.view=Nb(a,f,g),e.viewFrom=f):(e.viewFrom>f?e.view=Nb(a,f,e.viewFrom).concat(e.view):e.viewFrom<f&&(e.view=e.view.slice(Ca(a,f))),e.viewFrom=f,e.viewTo<g?e.view=e.view.concat(Nb(a,e.viewTo,g)):e.viewTo>g&&(e.view=e.view.slice(0,
21Ca(a,g))));e.viewTo=g;c.viewOffset=ea(u(a.doc,c.viewFrom));a.display.mover.style.top=c.viewOffset+"px";g=Kd(a);if(!d&&0==g&&!b.force&&c.renderedView==c.view&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo))return!1;f=fa();4<g&&(c.lineDiv.style.display="none");uf(a,c.updateLineNumbers,b.dims);4<g&&(c.lineDiv.style.display="");c.renderedView=c.view;f&&fa()!=f&&f.offsetHeight&&f.focus();za(c.cursorDiv);za(c.selectionDiv);c.gutters.style.height=0;d&&(c.lastWrapHeight=b.wrapperHeight,c.lastWrapWidth=
22b.wrapperWidth,fb(a,400));c.updateLineNumbers=null;return!0}function Md(a,b){for(var c=b.viewport,d=!0;;d=!1){if(!d||!a.options.lineWrapping||b.oldDisplayWidth==pa(a))if(c&&null!=c.top&&(c={top:Math.min(a.doc.height+Ec(a.display)-Nc(a),c.top)}),b.visible=Hc(a.display,a.doc,c),b.visible.from>=a.display.viewFrom&&b.visible.to<=a.display.viewTo)break;if(!Lc(a,b))break;Lb(a);d=jb(a);nb(a);Oc(a,d);Na(a,d)}b.signal(a,"update",a);if(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)b.signal(a,
23"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo}function Pc(a,b){var c=new Mb(a,b);if(Lc(a,c)){Lb(a);Md(a,c);var d=jb(a);nb(a);Oc(a,d);Na(a,d);c.finish()}}function Oc(a,b){a.display.sizer.style.minHeight=b.docHeight+"px";var c=b.docHeight+a.display.barHeight;a.display.heightForcer.style.top=c+"px";a.display.gutters.style.height=Math.max(c+da(a),b.clientHeight)+"px"}function Lb(a){a=a.display;for(var b=
24a.lineDiv.offsetTop,c=0;c<a.view.length;c++){var d=a.view[c],e;if(!d.hidden){if(B&&8>C){var f=d.node.offsetTop+d.node.offsetHeight;e=f-b;b=f}else e=d.node.getBoundingClientRect(),e=e.bottom-e.top;f=d.line.height-e;2>e&&(e=xa(a));if(.001<f||-.001>f)if(ca(d.line,e),Nd(d.line),d.rest)for(e=0;e<d.rest.length;e++)Nd(d.rest[e])}}}function Nd(a){if(a.widgets)for(var b=0;b<a.widgets.length;++b)a.widgets[b].height=a.widgets[b].node.offsetHeight}function Kc(a){for(var b=a.display,c={},d={},e=b.gutters.clientLeft,
25f=b.gutters.firstChild,g=0;f;f=f.nextSibling,++g)c[a.options.gutters[g]]=f.offsetLeft+f.clientLeft+e,d[a.options.gutters[g]]=f.clientWidth;return{fixedPos:Ic(b),gutterTotalWidth:b.gutters.offsetWidth,gutterLeft:c,gutterWidth:d,wrapperWidth:b.wrapper.clientWidth}}function uf(a,b,c){function d(b){var c=b.nextSibling;J&&W&&a.display.currentWheelTarget==b?b.style.display="none":b.parentNode.removeChild(b);return c}for(var e=a.display,f=a.options.lineNumbers,g=e.lineDiv,h=g.firstChild,k=e.view,e=e.viewFrom,
26l=0;l<k.length;l++){var m=k[l];if(!m.hidden)if(m.node&&m.node.parentNode==g){for(;h!=m.node;)h=d(h);h=f&&null!=b&&b<=e&&m.lineNumber;m.changes&&(-1<D(m.changes,"gutter")&&(h=!1),Od(a,m,e,c));h&&(za(m.lineNumber),m.lineNumber.appendChild(document.createTextNode(Jc(a.options,e))));h=m.node.nextSibling}else{var p=vf(a,m,e,c);g.insertBefore(p,h)}e+=m.size}for(;h;)h=d(h)}function Od(a,b,c,d){for(var e=0;e<b.changes.length;e++){var f=b.changes[e];if("text"==f){var f=b,g=f.text.className,h=Pd(a,f);f.text==
27f.node&&(f.node=h.pre);f.text.parentNode.replaceChild(h.pre,f.text);f.text=h.pre;h.bgClass!=f.bgClass||h.textClass!=f.textClass?(f.bgClass=h.bgClass,f.textClass=h.textClass,Qc(f)):g&&(f.text.className=g)}else if("gutter"==f)Qd(a,b,c,d);else if("class"==f)Qc(b);else if("widget"==f){f=a;g=b;h=d;g.alignable&&(g.alignable=null);for(var k=g.node.firstChild,l=void 0;k;k=l)l=k.nextSibling,"CodeMirror-linewidget"==k.className&&g.node.removeChild(k);Rd(f,g,h)}}b.changes=null}function Ob(a){a.node==a.text&&
28(a.node=t("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),B&&8>C&&(a.node.style.zIndex=2));return a.node}function Pd(a,b){var c=a.display.externalMeasured;return c&&c.line==b.line?(a.display.externalMeasured=null,b.measure=c.measure,c.built):Sd(a,b)}function Qc(a){var b=a.bgClass?a.bgClass+" "+(a.line.bgClass||""):a.line.bgClass;b&&(b+=" CodeMirror-linebackground");if(a.background)b?a.background.className=b:(a.background.parentNode.removeChild(a.background),
29a.background=null);else if(b){var c=Ob(a);a.background=c.insertBefore(t("div",null,b),c.firstChild)}a.line.wrapClass?Ob(a).className=a.line.wrapClass:a.node!=a.text&&(a.node.className="");a.text.className=(a.textClass?a.textClass+" "+(a.line.textClass||""):a.line.textClass)||""}function Qd(a,b,c,d){b.gutter&&(b.node.removeChild(b.gutter),b.gutter=null);var e=b.line.gutterMarkers;if(a.options.lineNumbers||e){var f=Ob(b),g=b.gutter=t("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?
30d.fixedPos:-d.gutterTotalWidth)+"px; width: "+d.gutterTotalWidth+"px");a.display.input.setUneditable(g);f.insertBefore(g,b.text);b.line.gutterClass&&(g.className+=" "+b.line.gutterClass);!a.options.lineNumbers||e&&e["CodeMirror-linenumbers"]||(b.lineNumber=g.appendChild(t("div",Jc(a.options,c),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+d.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px")));if(e)for(b=0;b<a.options.gutters.length;++b)c=a.options.gutters[b],
31(f=e.hasOwnProperty(c)&&e[c])&&g.appendChild(t("div",[f],"CodeMirror-gutter-elt","left: "+d.gutterLeft[c]+"px; width: "+d.gutterWidth[c]+"px"))}}function vf(a,b,c,d){var e=Pd(a,b);b.text=b.node=e.pre;e.bgClass&&(b.bgClass=e.bgClass);e.textClass&&(b.textClass=e.textClass);Qc(b);Qd(a,b,c,d);Rd(a,b,d);return b.node}function Rd(a,b,c){Td(a,b.line,b,c,!0);if(b.rest)for(var d=0;d<b.rest.length;d++)Td(a,b.rest[d],b,c,!1)}function Td(a,b,c,d,e){if(b.widgets){var f=Ob(c),g=0;for(b=b.widgets;g<b.length;++g){var h=
32b[g],k=t("div",[h.node],"CodeMirror-linewidget");h.handleMouseEvents||k.setAttribute("cm-ignore-events","true");var l=h,m=k,p=d;if(l.noHScroll){(c.alignable||(c.alignable=[])).push(m);var n=p.wrapperWidth;m.style.left=p.fixedPos+"px";l.coverGutter||(n-=p.gutterTotalWidth,m.style.paddingLeft=p.gutterTotalWidth+"px");m.style.width=n+"px"}l.coverGutter&&(m.style.zIndex=5,m.style.position="relative",l.noHScroll||(m.style.marginLeft=-p.gutterTotalWidth+"px"));a.display.input.setUneditable(k);e&&h.above?
33f.insertBefore(k,c.gutter||c.text):f.appendChild(k);L(h,"redraw")}}}function Rc(a){return r(a.line,a.ch)}function Pb(a,b){return 0>y(a,b)?b:a}function Qb(a,b){return 0>y(a,b)?a:b}function Ud(a){a.state.focused||(a.display.input.focus(),xc(a))}function Rb(a){return a.options.readOnly||a.doc.cantEdit}function Sc(a,b,c,d,e){var f=a.doc;a.display.shift=!1;d||(d=f.sel);var g=sa(b),h=null;a.state.pasteIncoming&&1<d.ranges.length&&(X&&X.join("\n")==b?h=0==d.ranges.length%X.length&&ob(X,sa):g.length==d.ranges.length&&
34(h=ob(g,function(a){return[a]})));for(var k=d.ranges.length-1;0<=k;k--){var l=d.ranges[k],m=l.from(),p=l.to();l.empty()&&(c&&0<c?m=r(m.line,m.ch-c):a.state.overwrite&&!a.state.pasteIncoming&&(p=r(p.line,Math.min(u(f,p.line).text.length,p.ch+A(g).length))));var n=a.curOp.updateInput,m={from:m,to:p,text:h?h[k%h.length]:g,origin:e||(a.state.pasteIncoming?"paste":a.state.cutIncoming?"cut":"+input")};Oa(a.doc,m);L(a,"inputRead",a,m);if(b&&!a.state.pasteIncoming&&a.options.electricChars&&a.options.smartIndent&&
35100>l.head.ch&&(!k||d.ranges[k-1].head.line!=l.head.line)){l=a.getModeAt(l.head);m=ta(m);p=!1;if(l.electricChars)for(var E=0;E<l.electricChars.length;E++){if(-1<b.indexOf(l.electricChars.charAt(E))){p=pb(a,m.line,"smart");break}}else l.electricInput&&l.electricInput.test(u(f,m.line).text.slice(0,m.ch))&&(p=pb(a,m.line,"smart"));p&&L(a,"electricInput",a,m.line)}}Pa(a);a.curOp.updateInput=n;a.curOp.typing=!0;a.state.pasteIncoming=a.state.cutIncoming=!1}function Vd(a){for(var b=[],c=[],d=0;d<a.doc.sel.ranges.length;d++){var e=
36a.doc.sel.ranges[d].head.line,e={anchor:r(e,0),head:r(e+1,0)};c.push(e);b.push(a.getRange(e.anchor,e.head))}return{text:b,ranges:c}}function Wd(a){a.setAttribute("autocorrect","off");a.setAttribute("autocapitalize","off");a.setAttribute("spellcheck","false")}function Tc(a){this.cm=a;this.prevInput="";this.pollingFast=!1;this.polling=new bb;this.hasSelection=this.inaccurateSelection=!1;this.composing=null}function Xd(){var a=t("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none"),
37b=t("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");J?a.style.width="1000px":a.setAttribute("wrap","off");Qa&&(a.style.border="1px solid black");Wd(a);return b}function Uc(a){this.cm=a;this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null;this.polling=new bb;this.gracePeriod=!1}function Yd(a,b){var c=Vc(a,b.line);if(!c||c.hidden)return null;var d=u(a.doc,b.line),c=Zd(c,d,b.line);(d=Y(d))&&Sb(d,b.ch);d=$d(c.map,b.ch,"left");d.offset=
38"right"==d.collapse?d.end:d.start;return d}function Ra(a,b){b&&(a.bad=!0);return a}function Tb(a,b,c){var d;if(b==a.display.lineDiv){d=a.display.lineDiv.childNodes[c];if(!d)return Ra(a.clipPos(r(a.display.viewTo-1)),!0);b=null;c=0}else for(d=b;;d=d.parentNode){if(!d||d==a.display.lineDiv)return null;if(d.parentNode&&d.parentNode==a.display.lineDiv)break}for(var e=0;e<a.display.view.length;e++){var f=a.display.view[e];if(f.node==d)return wf(f,b,c)}}function wf(a,b,c){function d(b,c,d){for(var e=-1;e<
39(l?l.length:0);e++)for(var f=0>e?k.map:l[e],g=0;g<f.length;g+=3){var h=f[g+2];if(h==b||h==c){c=F(0>e?a.line:a.rest[e]);e=f[g]+d;if(0>d||h!=b)e=f[g+(d?1:0)];return r(c,e)}}}var e=a.text.firstChild,f=!1;if(!b||!Wc(e,b))return Ra(r(F(a.line),0),!0);if(b==e&&(f=!0,b=e.childNodes[c],c=0,!b))return c=a.rest?A(a.rest):a.line,Ra(r(F(c),c.text.length),f);var g=3==b.nodeType?b:null,h=b;g||1!=b.childNodes.length||3!=b.firstChild.nodeType||(g=b.firstChild,c&&(c=g.nodeValue.length));for(;h.parentNode!=e;)h=h.parentNode;
40var k=a.measure,l=k.maps;if(b=d(g,h,c))return Ra(b,f);e=h.nextSibling;for(g=g?g.nodeValue.length-c:0;e;e=e.nextSibling){if(b=d(e,e.firstChild,0))return Ra(r(b.line,b.ch-g),f);g+=e.textContent.length}h=h.previousSibling;for(g=c;h;h=h.previousSibling){if(b=d(h,h.firstChild,-1))return Ra(r(b.line,b.ch+g),f);g+=e.textContent.length}}function xf(a,b,c,d,e){function f(a){return function(b){return b.id==a}}function g(b){if(1==b.nodeType){var c=b.getAttribute("cm-text");if(null!=c)""==c&&(c=b.textContent.replace(/\u200b/g,
41"")),h+=c;else{var c=b.getAttribute("cm-marker"),p;if(c)b=a.findMarks(r(d,0),r(e+1,0),f(+c)),b.length&&(p=b[0].find())&&(h+=Da(a.doc,p.from,p.to).join("\n"));else if("false"!=b.getAttribute("contenteditable")){for(p=0;p<b.childNodes.length;p++)g(b.childNodes[p]);/^(pre|div|p)$/i.test(b.nodeName)&&(k=!0)}}}else 3==b.nodeType&&(b=b.nodeValue)&&(k&&(h+="\n",k=!1),h+=b)}for(var h="",k=!1;;){g(b);if(b==c)break;b=b.nextSibling}return h}function la(a,b){this.ranges=a;this.primIndex=b}function z(a,b){this.anchor=
42a;this.head=b}function Z(a,b){var c=a[b];a.sort(function(a,b){return y(a.from(),b.from())});b=D(a,c);for(c=1;c<a.length;c++){var d=a[c],e=a[c-1];if(0<=y(e.to(),d.from())){var f=Qb(e.from(),d.from()),g=Pb(e.to(),d.to()),d=e.empty()?d.from()==d.head:e.from()==e.head;c<=b&&--b;a.splice(--c,2,new z(d?g:f,d?f:g))}}return new la(a,b)}function ga(a,b){return new la([new z(a,b||a)],0)}function w(a,b){if(b.line<a.first)return r(a.first,0);var c=a.first+a.size-1;if(b.line>c)return r(c,u(a,c).text.length);var c=
43u(a,b.line).text.length,d=b.ch,c=null==d||d>c?r(b.line,c):0>d?r(b.line,0):b;return c}function qb(a,b){return b>=a.first&&b<a.first+a.size}function rb(a,b,c,d){return a.cm&&a.cm.display.shift||a.extend?(a=b.anchor,d&&(b=0>y(c,a),b!=0>y(d,a)?(a=c,c=d):b!=0>y(c,d)&&(c=d)),new z(a,c)):new z(d||c,c)}function Ub(a,b,c,d){H(a,new la([rb(a,a.sel.primary(),b,c)],0),d)}function ae(a,b,c){for(var d=[],e=0;e<a.sel.ranges.length;e++)d[e]=rb(a,a.sel.ranges[e],b[e],null);b=Z(d,a.sel.primIndex);H(a,b,c)}function Xc(a,
44b,c,d){var e=a.sel.ranges.slice(0);e[b]=c;H(a,Z(e,a.sel.primIndex),d)}function yf(a,b){var c={ranges:b.ranges,update:function(b){this.ranges=[];for(var c=0;c<b.length;c++)this.ranges[c]=new z(w(a,b[c].anchor),w(a,b[c].head))}};K(a,"beforeSelectionChange",a,c);a.cm&&K(a.cm,"beforeSelectionChange",a.cm,c);return c.ranges!=b.ranges?Z(c.ranges,c.ranges.length-1):b}function be(a,b,c){var d=a.history.done,e=A(d);e&&e.ranges?(d[d.length-1]=b,Vb(a,b,c)):H(a,b,c)}function H(a,b,c){Vb(a,b,c);b=a.sel;var d=
45a.cm?a.cm.curOp.id:NaN,e=a.history,f=c&&c.origin,g;if(!(g=d==e.lastSelOp)&&(g=f&&e.lastSelOrigin==f)&&!(g=e.lastModTime==e.lastSelTime&&e.lastOrigin==f)){g=A(e.done);var h=f.charAt(0);g="*"==h||"+"==h&&g.ranges.length==b.ranges.length&&g.somethingSelected()==b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}g?e.done[e.done.length-1]=b:Wb(b,e.done);e.lastSelTime=+new Date;e.lastSelOrigin=f;e.lastSelOp=d;c&&!1!==c.clearRedo&&ce(e.undone)}function Vb(a,
46b,c){if(S(a,"beforeSelectionChange")||a.cm&&S(a.cm,"beforeSelectionChange"))b=yf(a,b);var d=c&&c.bias||(0>y(b.primary().head,a.sel.primary().head)?-1:1);de(a,ee(a,b,d,!0));c&&!1===c.scroll||!a.cm||Pa(a.cm)}function de(a,b){b.equals(a.sel)||(a.sel=b,a.cm&&(a.cm.curOp.updateInput=a.cm.curOp.selectionChanged=!0,fe(a.cm)),L(a,"cursorActivity",a))}function ge(a){de(a,ee(a,a.sel,null,!1),ha)}function ee(a,b,c,d){for(var e,f=0;f<b.ranges.length;f++){var g=b.ranges[f],h=Xb(a,g.anchor,c,d),k=Xb(a,g.head,c,
47d);if(e||h!=g.anchor||k!=g.head)e||(e=b.ranges.slice(0,f)),e[f]=new z(h,k)}return e?Z(e,b.primIndex):b}function Xb(a,b,c,d){var e=!1,f=b,g=c||1;a.cantEdit=!1;a:for(;;){var h=u(a,f.line);if(h.markedSpans)for(var k=0;k<h.markedSpans.length;++k){var l=h.markedSpans[k],m=l.marker;if((null==l.from||(m.inclusiveLeft?l.from<=f.ch:l.from<f.ch))&&(null==l.to||(m.inclusiveRight?l.to>=f.ch:l.to>f.ch))){if(d&&(K(m,"beforeCursorEnter"),m.explicitlyCleared))if(h.markedSpans){--k;continue}else break;if(m.atomic){k=
48m.find(0>g?-1:1);if(0==y(k,f)&&(k.ch+=g,0>k.ch?k=k.line>a.first?w(a,r(k.line-1)):null:k.ch>h.text.length&&(k=k.line<a.first+a.size-1?r(k.line+1,0):null),!k)){if(e){if(!d)return Xb(a,b,c,!0);a.cantEdit=!0;return r(a.first,0)}e=!0;k=b;g=-g}f=k;continue a}}}return f}}function nb(a){a.display.input.showSelection(a.display.input.prepareSelection())}function he(a,b){for(var c=a.doc,d={},e=d.cursors=document.createDocumentFragment(),f=d.selection=document.createDocumentFragment(),g=0;g<c.sel.ranges.length;g++)if(!1!==
49b||g!=c.sel.primIndex){var h=c.sel.ranges[g],k=h.empty();if(k||a.options.showCursorWhenSelecting){var l=a,m=e,p=ma(l,h.head,"div",null,null,!l.options.singleCursorHeightPerLine),n=m.appendChild(t("div"," ","CodeMirror-cursor"));n.style.left=p.left+"px";n.style.top=p.top+"px";n.style.height=Math.max(0,p.bottom-p.top)*l.options.cursorHeight+"px";p.other&&(l=m.appendChild(t("div"," ","CodeMirror-cursor CodeMirror-secondarycursor")),l.style.display="",l.style.left=p.other.left+"px",l.style.top=p.other.top+
50"px",l.style.height=.85*(p.other.bottom-p.other.top)+"px")}k||zf(a,h,f)}return d}function zf(a,b,c){function d(a,b,c,d){0>b&&(b=0);b=Math.round(b);d=Math.round(d);h.appendChild(t("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?m-a:c)+"px; height: "+(d-b)+"px"))}function e(b,c,e){var f=u(g,b),h=f.text.length,k,p;Af(Y(f),c||0,null==e?h:e,function(g,q,t){var u=Yb(a,r(b,g),"div",f,"left"),v,w;g==q?(v=u,t=w=u.left):(v=Yb(a,r(b,q-1),"div",f,"right"),
51"rtl"==t&&(t=u,u=v,v=t),t=u.left,w=v.right);null==c&&0==g&&(t=l);3<v.top-u.top&&(d(t,u.top,null,u.bottom),t=l,u.bottom<v.top&&d(t,u.bottom,null,v.top));null==e&&q==h&&(w=m);if(!k||u.top<k.top||u.top==k.top&&u.left<k.left)k=u;if(!p||v.bottom>p.bottom||v.bottom==p.bottom&&v.right>p.right)p=v;t<l+1&&(t=l);d(t,v.top,w-t,v.bottom)});return{start:k,end:p}}var f=a.display,g=a.doc,h=document.createDocumentFragment(),k=ie(a.display),l=k.left,m=Math.max(f.sizerWidth,pa(a)-f.sizer.offsetLeft)-k.right,f=b.from();
52b=b.to();if(f.line==b.line)e(f.line,f.ch,b.ch);else{var p=u(g,f.line),k=u(g,b.line),k=ia(p)==ia(k),f=e(f.line,f.ch,k?p.text.length+1:null).end;b=e(b.line,k?0:null,b.ch).start;k&&(f.top<b.top-2?(d(f.right,f.top,null,f.bottom),d(l,b.top,b.left,b.bottom)):d(f.right,f.top,b.left-f.right,f.bottom));f.bottom<b.top&&d(l,f.bottom,null,b.top)}c.appendChild(h)}function Yc(a){if(a.state.focused){var b=a.display;clearInterval(b.blinker);var c=!0;b.cursorDiv.style.visibility="";0<a.options.cursorBlinkRate?b.blinker=
53setInterval(function(){b.cursorDiv.style.visibility=(c=!c)?"":"hidden"},a.options.cursorBlinkRate):0>a.options.cursorBlinkRate&&(b.cursorDiv.style.visibility="hidden")}}function fb(a,b){a.doc.mode.startState&&a.doc.frontier<a.display.viewTo&&a.state.highlight.set(b,cb(Bf,a))}function Bf(a){var b=a.doc;b.frontier<b.first&&(b.frontier=b.first);if(!(b.frontier>=a.display.viewTo)){var c=+new Date+a.options.workTime,d=Sa(b.mode,sb(a,b.frontier)),e=[];b.iter(b.frontier,Math.min(b.first+b.size,a.display.viewTo+
54500),function(f){if(b.frontier>=a.display.viewFrom){var g=f.styles,h=je(a,f,d,!0);f.styles=h.styles;var k=f.styleClasses;(h=h.classes)?f.styleClasses=h:k&&(f.styleClasses=null);k=!g||g.length!=f.styles.length||k!=h&&(!k||!h||k.bgClass!=h.bgClass||k.textClass!=h.textClass);for(h=0;!k&&h<g.length;++h)k=g[h]!=f.styles[h];k&&e.push(b.frontier);f.stateAfter=Sa(b.mode,d)}else Zc(a,f.text,d),f.stateAfter=0==b.frontier%5?Sa(b.mode,d):null;++b.frontier;if(+new Date>c)return fb(a,a.options.workDelay),!0});
55e.length&&T(a,function(){for(var b=0;b<e.length;b++)na(a,e[b],"text")})}}function Cf(a,b,c){for(var d,e,f=a.doc,g=c?-1:b-(a.doc.mode.innerMode?1E3:100);b>g;--b){if(b<=f.first)return f.first;var h=u(f,b-1);if(h.stateAfter&&(!c||b<=f.frontier))return b;h=aa(h.text,null,a.options.tabSize);if(null==e||d>h)e=b-1,d=h}return e}function sb(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=Cf(a,b,c),g=f>d.first&&u(d,f-1).stateAfter,g=g?Sa(d.mode,g):Df(d.mode);d.iter(f,b,function(c){Zc(a,
56c.text,g);c.stateAfter=f==b-1||0==f%5||f>=e.viewFrom&&f<e.viewTo?Sa(d.mode,g):null;++f});c&&(d.frontier=f);return g}function Ec(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function ie(a){if(a.cachedPaddingH)return a.cachedPaddingH;var b=U(a.measure,t("pre","x")),b=window.getComputedStyle?window.getComputedStyle(b):b.currentStyle,b={left:parseInt(b.paddingLeft),right:parseInt(b.paddingRight)};isNaN(b.left)||isNaN(b.right)||(a.cachedPaddingH=b);return b}function da(a){return Hd-a.display.nativeBarWidth}
57function pa(a){return a.display.scroller.clientWidth-da(a)-a.display.barWidth}function Nc(a){return a.display.scroller.clientHeight-da(a)-a.display.barHeight}function Zd(a,b,c){if(a.line==b)return{map:a.measure.map,cache:a.measure.cache};for(var d=0;d<a.rest.length;d++)if(a.rest[d]==b)return{map:a.measure.maps[d],cache:a.measure.caches[d]};for(d=0;d<a.rest.length;d++)if(F(a.rest[d])>c)return{map:a.measure.maps[d],cache:a.measure.caches[d],before:!0}}function Vc(a,b){if(b>=a.display.viewFrom&&b<a.display.viewTo)return a.display.view[Ca(a,
58b)];var c=a.display.externalMeasured;if(c&&b>=c.lineN&&b<c.lineN+c.size)return c}function Zb(a,b){var c=F(b),d=Vc(a,c);d&&!d.text?d=null:d&&d.changes&&Od(a,d,c,Kc(a));if(!d){var e;e=ia(b);d=F(e);e=a.display.externalMeasured=new ke(a.doc,e,d);e.lineN=d;d=e.built=Sd(a,e);e.text=d.pre;U(a.display.lineMeasure,d.pre);d=e}c=Zd(d,b,c);return{line:b,view:d,rect:null,map:c.map,cache:c.cache,before:c.before,hasHeights:!1}}function $c(a,b,c,d,e){b.before&&(c=-1);var f=c+(d||"");if(b.cache.hasOwnProperty(f))a=
59b.cache[f];else{b.rect||(b.rect=b.view.text.getBoundingClientRect());if(!b.hasHeights){var g=b.view,h=b.rect,k=a.options.lineWrapping,l=k&&pa(a);if(!g.measure.heights||k&&g.measure.width!=l){var m=g.measure.heights=[];if(k)for(g.measure.width=l,g=g.text.firstChild.getClientRects(),k=0;k<g.length-1;k++){var l=g[k],p=g[k+1];2<Math.abs(l.bottom-p.bottom)&&m.push((l.bottom+p.top)/2-h.top)}m.push(h.bottom-h.top)}b.hasHeights=!0}g=d;k=$d(b.map,c,g);d=k.node;h=k.start;l=k.end;c=k.collapse;var n;if(3==d.nodeType){for(m=
600;4>m;m++){for(;h&&tb(b.line.text.charAt(k.coverStart+h));)--h;for(;k.coverStart+l<k.coverEnd&&tb(b.line.text.charAt(k.coverStart+l));)++l;if(B&&9>C&&0==h&&l==k.coverEnd-k.coverStart)n=d.parentNode.getBoundingClientRect();else if(B&&a.options.lineWrapping){var E=Ea(d,h,l).getClientRects();n=E.length?E["right"==g?E.length-1:0]:ad}else n=Ea(d,h,l).getBoundingClientRect()||ad;if(n.left||n.right||0==h)break;l=h;--h;c="right"}B&&11>C&&((E=!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI)||
61(null!=bd?E=bd:(m=U(a.display.measure,t("span","x")),E=m.getBoundingClientRect(),m=Ea(m,0,1).getBoundingClientRect(),E=bd=1<Math.abs(E.left-m.left)),E=!E),E||(E=screen.logicalXDPI/screen.deviceXDPI,m=screen.logicalYDPI/screen.deviceYDPI,n={left:n.left*E,right:n.right*E,top:n.top*m,bottom:n.bottom*m}))}else 0<h&&(c=g="right"),n=a.options.lineWrapping&&1<(E=d.getClientRects()).length?E["right"==g?E.length-1:0]:d.getBoundingClientRect();!(B&&9>C)||h||n&&(n.left||n.right)||(n=(n=d.parentNode.getClientRects()[0])?
62{left:n.left,right:n.left+gb(a.display),top:n.top,bottom:n.bottom}:ad);E=n.top-b.rect.top;d=n.bottom-b.rect.top;h=(E+d)/2;g=b.view.measure.heights;for(m=0;m<g.length-1&&!(h<g[m]);m++);c={left:("right"==c?n.right:n.left)-b.rect.left,right:("left"==c?n.left:n.right)-b.rect.left,top:m?g[m-1]:0,bottom:g[m]};n.left||n.right||(c.bogus=!0);a.options.singleCursorHeightPerLine||(c.rtop=E,c.rbottom=d);a=c;a.bogus||(b.cache[f]=a)}return{left:a.left,right:a.right,top:e?a.rtop:a.top,bottom:e?a.rbottom:a.bottom}}
63function $d(a,b,c){for(var d,e,f,g,h=0;h<a.length;h+=3){var k=a[h],l=a[h+1];if(b<k)e=0,f=1,g="left";else if(b<l)e=b-k,f=e+1;else if(h==a.length-3||b==l&&a[h+3]>b)f=l-k,e=f-1,b>=l&&(g="right");if(null!=e){d=a[h+2];k==l&&c==(d.insertLeft?"left":"right")&&(g=c);if("left"==c&&0==e)for(;h&&a[h-2]==a[h-3]&&a[h-1].insertLeft;)d=a[(h-=3)+2],g="left";if("right"==c&&e==l-k)for(;h<a.length-3&&a[h+3]==a[h+4]&&!a[h+5].insertLeft;)d=a[(h+=3)+2],g="right";break}}return{node:d,start:e,end:f,collapse:g,coverStart:k,
64coverEnd:l}}function le(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var b=0;b<a.rest.length;b++)a.measure.caches[b]={}}function me(a){a.display.externalMeasure=null;za(a.display.lineMeasure);for(var b=0;b<a.display.view.length;b++)le(a.display.view[b])}function hb(a){me(a);a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null;a.options.lineWrapping||(a.display.maxLineChanged=!0);a.display.lineNumChars=null}function cd(a,b,c,d){if(b.widgets)for(var e=
650;e<b.widgets.length;++e)if(b.widgets[e].above){var f=ub(b.widgets[e]);c.top+=f;c.bottom+=f}if("line"==d)return c;d||(d="local");b=ea(b);b="local"==d?b+a.display.lineSpace.offsetTop:b-a.display.viewOffset;if("page"==d||"window"==d)a=a.display.lineSpace.getBoundingClientRect(),b+=a.top+("window"==d?0:window.pageYOffset||(document.documentElement||document.body).scrollTop),d=a.left+("window"==d?0:window.pageXOffset||(document.documentElement||document.body).scrollLeft),c.left+=d,c.right+=d;c.top+=b;
66c.bottom+=b;return c}function ne(a,b,c){if("div"==c)return b;var d=b.left;b=b.top;"page"==c?(d-=window.pageXOffset||(document.documentElement||document.body).scrollLeft,b-=window.pageYOffset||(document.documentElement||document.body).scrollTop):"local"!=c&&c||(c=a.display.sizer.getBoundingClientRect(),d+=c.left,b+=c.top);a=a.display.lineSpace.getBoundingClientRect();return{left:d-a.left,top:b-a.top}}function Yb(a,b,c,d,e){d||(d=u(a.doc,b.line));var f=d;b=b.ch;d=$c(a,Zb(a,d),b,e);return cd(a,f,d,c)}
67function ma(a,b,c,d,e,f){function g(b,g){var h=$c(a,e,b,g?"right":"left",f);g?h.left=h.right:h.right=h.left;return cd(a,d,h,c)}function h(a,b){var c=k[b],d=c.level%2;a==dd(c)&&b&&c.level<k[b-1].level?(c=k[--b],a=ed(c)-(c.level%2?0:1),d=!0):a==ed(c)&&b<k.length-1&&c.level<k[b+1].level&&(c=k[++b],a=dd(c)-c.level%2,d=!1);return d&&a==c.to&&a>c.from?g(a-1):g(a,d)}d=d||u(a.doc,b.line);e||(e=Zb(a,d));var k=Y(d);b=b.ch;if(!k)return g(b);var l=Sb(k,b),l=h(b,l);null!=vb&&(l.other=h(b,vb));return l}function oe(a,
68b){var c=0;b=w(a.doc,b);a.options.lineWrapping||(c=gb(a.display)*b.ch);var d=u(a.doc,b.line),e=ea(d)+a.display.lineSpace.offsetTop;return{left:c,right:c,top:e,bottom:e+d.height}}function $b(a,b,c,d){a=r(a,b);a.xRel=d;c&&(a.outside=!0);return a}function fd(a,b,c){var d=a.doc;c+=a.display.viewOffset;if(0>c)return $b(d.first,0,!0,-1);var e=Ba(d,c),f=d.first+d.size-1;if(e>f)return $b(d.first+d.size-1,u(d,f).text.length,!0,1);0>b&&(b=0);for(d=u(d,e);;)if(e=Ef(a,d,e,b,c),f=(d=Aa(d,!1))&&d.find(0,!0),d&&
69(e.ch>f.from.ch||e.ch==f.from.ch&&0<e.xRel))e=F(d=f.to.line);else return e}function Ef(a,b,c,d,e){function f(d){d=ma(a,r(c,d),"line",b,l);h=!0;if(g>d.bottom)return d.left-k;if(g<d.top)return d.left+k;h=!1;return d.left}var g=e-ea(b),h=!1,k=2*a.display.wrapper.clientWidth,l=Zb(a,b),m=Y(b),p=b.text.length;e=ac(b);var n=bc(b),E=f(e),q=h,t=f(n),u=h;if(d>t)return $b(c,n,u,1);for(;;){if(m?n==e||n==gd(b,e,1):1>=n-e){m=d<E||d-E<=t-d?e:n;for(d-=m==e?E:t;tb(b.text.charAt(m));)++m;return $b(c,m,m==e?q:u,-1>
70d?-1:1<d?1:0)}var v=Math.ceil(p/2),w=e+v;if(m)for(var w=e,x=0;x<v;++x)w=gd(b,w,1);x=f(w);if(x>d){n=w;t=x;if(u=h)t+=1E3;p=v}else e=w,E=x,q=h,p-=v}}function xa(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==Fa){Fa=t("pre");for(var b=0;49>b;++b)Fa.appendChild(document.createTextNode("x")),Fa.appendChild(t("br"));Fa.appendChild(document.createTextNode("x"))}U(a.measure,Fa);b=Fa.offsetHeight/50;3<b&&(a.cachedTextHeight=b);za(a.measure);return b||1}function gb(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;
71var b=t("span","xxxxxxxxxx"),c=t("pre",[b]);U(a.measure,c);b=b.getBoundingClientRect();b=(b.right-b.left)/10;2<b&&(a.cachedCharWidth=b);return b||10}function Ja(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ff};Ta?Ta.ops.push(a.curOp):a.curOp.ownsGroup=Ta={ops:[a.curOp],delayedCallbacks:[]}}
72function La(a){if(a=a.curOp.ownsGroup)try{var b=a.delayedCallbacks,c=0;do{for(;c<b.length;c++)b[c]();for(var d=0;d<a.ops.length;d++){var e=a.ops[d];if(e.cursorActivityHandlers)for(;e.cursorActivityCalled<e.cursorActivityHandlers.length;)e.cursorActivityHandlers[e.cursorActivityCalled++](e.cm)}}while(c<b.length)}finally{Ta=null;for(b=0;b<a.ops.length;b++)a.ops[b].cm.curOp=null;a=a.ops;for(b=0;b<a.length;b++){var e=a[b],c=e.cm,f=d=c.display;!f.scrollbarsClipped&&f.scroller.offsetWidth&&(f.nativeBarWidth=
73f.scroller.offsetWidth-f.scroller.clientWidth,f.heightForcer.style.height=da(c)+"px",f.sizer.style.marginBottom=-f.nativeBarWidth+"px",f.sizer.style.borderRightWidth=da(c)+"px",f.scrollbarsClipped=!0);e.updateMaxLine&&Dc(c);e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<d.viewFrom||e.scrollToPos.to.line>=d.viewTo)||d.maxLineChanged&&c.options.lineWrapping;e.update=e.mustUpdate&&new Mb(c,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}for(b=
740;b<a.length;b++)e=a[b],e.updatedDisplay=e.mustUpdate&&Lc(e.cm,e.update);for(b=0;b<a.length;b++)if(e=a[b],c=e.cm,d=c.display,e.updatedDisplay&&Lb(c),e.barMeasure=jb(c),d.maxLineChanged&&!c.options.lineWrapping&&(f=void 0,f=d.maxLine.text.length,f=$c(c,Zb(c,d.maxLine),f,void 0),e.adjustWidthTo=f.left+3,c.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(d.scroller.clientWidth,d.sizer.offsetLeft+e.adjustWidthTo+da(c)+c.display.barWidth),e.maxScrollLeft=Math.max(0,d.sizer.offsetLeft+
75e.adjustWidthTo-pa(c))),e.updatedDisplay||e.selectionChanged)e.preparedSelection=d.input.prepareSelection();for(b=0;b<a.length;b++)e=a[b],c=e.cm,null!=e.adjustWidthTo&&(c.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<c.doc.scrollLeft&&Ma(c,Math.min(c.display.scroller.scrollLeft,e.maxScrollLeft),!0),c.display.maxLineChanged=!1),e.preparedSelection&&c.display.input.showSelection(e.preparedSelection),e.updatedDisplay&&Oc(c,e.barMeasure),(e.updatedDisplay||e.startHeight!=c.doc.height)&&
76Na(c,e.barMeasure),e.selectionChanged&&Yc(c),c.state.focused&&e.updateInput&&c.display.input.reset(e.typing),e.focus&&e.focus==fa()&&Ud(e.cm);for(b=0;b<a.length;b++){e=a[b];c=e.cm;d=c.display;f=c.doc;e.updatedDisplay&&Md(c,e.update);null==d.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(d.wheelStartX=d.wheelStartY=null);null==e.scrollTop||d.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(f.scrollTop=Math.max(0,Math.min(d.scroller.scrollHeight-d.scroller.clientHeight,e.scrollTop)),
77d.scrollbars.setScrollTop(f.scrollTop),d.scroller.scrollTop=f.scrollTop);null==e.scrollLeft||d.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(f.scrollLeft=Math.max(0,Math.min(d.scroller.scrollWidth-pa(c),e.scrollLeft)),d.scrollbars.setScrollLeft(f.scrollLeft),d.scroller.scrollLeft=f.scrollLeft,Bc(c));if(e.scrollToPos){var g=void 0,h=w(f,e.scrollToPos.from),g=w(f,e.scrollToPos.to),k=e.scrollToPos.margin;null==k&&(k=0);for(var l=0;5>l;l++){var m=!1,p=ma(c,h),n=g&&g!=h?ma(c,g):p,n=cc(c,Math.min(p.left,
78n.left),Math.min(p.top,n.top)-k,Math.max(p.left,n.left),Math.max(p.bottom,n.bottom)+k),q=c.doc.scrollTop,r=c.doc.scrollLeft;null!=n.scrollTop&&(lb(c,n.scrollTop),1<Math.abs(c.doc.scrollTop-q)&&(m=!0));null!=n.scrollLeft&&(Ma(c,n.scrollLeft),1<Math.abs(c.doc.scrollLeft-r)&&(m=!0));if(!m)break}g=p;e.scrollToPos.isCursor&&c.state.focused&&(ja(c,"scrollCursorIntoView")||(k=c.display,l=k.sizer.getBoundingClientRect(),h=null,0>g.top+l.top?h=!0:g.bottom+l.top>(window.innerHeight||document.documentElement.clientHeight)&&
79(h=!1),null==h||Gf||(g=t("div","​",null,"position: absolute; top: "+(g.top-k.viewOffset-c.display.lineSpace.offsetTop)+"px; height: "+(g.bottom-g.top+da(c)+k.barHeight)+"px; left: "+g.left+"px; width: 2px;"),c.display.lineSpace.appendChild(g),g.scrollIntoView(h),c.display.lineSpace.removeChild(g))))}h=e.maybeHiddenMarkers;g=e.maybeUnhiddenMarkers;if(h)for(k=0;k<h.length;++k)h[k].lines.length||K(h[k],"hide");if(g)for(k=0;k<g.length;++k)g[k].lines.length&&K(g[k],"unhide");d.wrapper.offsetHeight&&(f.scrollTop=
80c.display.scroller.scrollTop);e.changeObjs&&K(c,"changes",c,e.changeObjs);e.update&&e.update.finish()}}}function T(a,b){if(a.curOp)return b();Ja(a);try{return b()}finally{La(a)}}function G(a,b){return function(){if(a.curOp)return b.apply(a,arguments);Ja(a);try{return b.apply(a,arguments)}finally{La(a)}}}function M(a){return function(){if(this.curOp)return a.apply(this,arguments);Ja(this);try{return a.apply(this,arguments)}finally{La(this)}}}function N(a){return function(){var b=this.cm;if(!b||b.curOp)return a.apply(this,
81arguments);Ja(b);try{return a.apply(this,arguments)}finally{La(b)}}}function ke(a,b,c){for(var d=this.line=b,e;d=Aa(d,!1);)d=d.find(1,!0).line,(e||(e=[])).push(d);this.size=(this.rest=e)?F(A(this.rest))-c+1:1;this.node=this.text=null;this.hidden=ya(a,b)}function Nb(a,b,c){var d=[],e;for(e=b;e<c;)b=new ke(a.doc,u(a.doc,e),e),e+=b.size,d.push(b);return d}function Q(a,b,c,d){null==b&&(b=a.doc.first);null==c&&(c=a.doc.first+a.doc.size);d||(d=0);var e=a.display;d&&c<e.viewTo&&(null==e.updateLineNumbers||
82e.updateLineNumbers>b)&&(e.updateLineNumbers=b);a.curOp.viewChanged=!0;if(b>=e.viewTo)ra&&Mc(a.doc,b)<e.viewTo&&qa(a);else if(c<=e.viewFrom)ra&&Ld(a.doc,c+d)>e.viewFrom?qa(a):(e.viewFrom+=d,e.viewTo+=d);else if(b<=e.viewFrom&&c>=e.viewTo)qa(a);else if(b<=e.viewFrom){var f=dc(a,c,c+d,1);f?(e.view=e.view.slice(f.index),e.viewFrom=f.lineN,e.viewTo+=d):qa(a)}else if(c>=e.viewTo)(f=dc(a,b,b,-1))?(e.view=e.view.slice(0,f.index),e.viewTo=f.lineN):qa(a);else{var f=dc(a,b,b,-1),g=dc(a,c,c+d,1);f&&g?(e.view=
83e.view.slice(0,f.index).concat(Nb(a,f.lineN,g.lineN)).concat(e.view.slice(g.index)),e.viewTo+=d):qa(a)}if(a=e.externalMeasured)c<a.lineN?a.lineN+=d:b<a.lineN+a.size&&(e.externalMeasured=null)}function na(a,b,c){a.curOp.viewChanged=!0;var d=a.display,e=a.display.externalMeasured;e&&b>=e.lineN&&b<e.lineN+e.size&&(d.externalMeasured=null);b<d.viewFrom||b>=d.viewTo||(a=d.view[Ca(a,b)],null!=a.node&&(a=a.changes||(a.changes=[]),-1==D(a,c)&&a.push(c)))}function qa(a){a.display.viewFrom=a.display.viewTo=
84a.doc.first;a.display.view=[];a.display.viewOffset=0}function Ca(a,b){if(b>=a.display.viewTo)return null;b-=a.display.viewFrom;if(0>b)return null;for(var c=a.display.view,d=0;d<c.length;d++)if(b-=c[d].size,0>b)return d}function dc(a,b,c,d){var e=Ca(a,b),f=a.display.view;if(!ra||c==a.doc.first+a.doc.size)return{index:e,lineN:c};for(var g=0,h=a.display.viewFrom;g<e;g++)h+=f[g].size;if(h!=b){if(0<d){if(e==f.length-1)return null;b=h+f[e].size-b;e++}else b=h-b;c+=b}for(;Mc(a.doc,c)!=c;){if(e==(0>d?0:f.length-
851))return null;c+=d*f[e-(0>d?1:0)].size;e+=d}return{index:e,lineN:c}}function Kd(a){a=a.display.view;for(var b=0,c=0;c<a.length;c++){var d=a[c];d.hidden||d.node&&!d.changes||++b}return b}function sf(a){function b(){d.activeTouch&&(e=setTimeout(function(){d.activeTouch=null},1E3),f=d.activeTouch,f.end=+new Date)}function c(a,b){if(null==b.left)return!0;var c=b.left-a.left,d=b.top-a.top;return 400<c*c+d*d}var d=a.display;v(d.scroller,"mousedown",G(a,pe));B&&11>C?v(d.scroller,"dblclick",G(a,function(b){if(!ja(a,
86b)){var c=Ua(a,b);!c||hd(a,b,"gutterClick",!0,L)||oa(a.display,b)||(O(b),b=a.findWordAt(c),Ub(a.doc,b.anchor,b.head))}})):v(d.scroller,"dblclick",function(b){ja(a,b)||O(b)});id||v(d.scroller,"contextmenu",function(b){qe(a,b)});var e,f={end:0};v(d.scroller,"touchstart",function(a){var b;1!=a.touches.length?b=!1:(b=a.touches[0],b=1>=b.radiusX&&1>=b.radiusY);b||(clearTimeout(e),b=+new Date,d.activeTouch={start:b,moved:!1,prev:300>=b-f.end?f:null},1==a.touches.length&&(d.activeTouch.left=a.touches[0].pageX,
87d.activeTouch.top=a.touches[0].pageY))});v(d.scroller,"touchmove",function(){d.activeTouch&&(d.activeTouch.moved=!0)});v(d.scroller,"touchend",function(e){var f=d.activeTouch;if(f&&!oa(d,e)&&null!=f.left&&!f.moved&&300>new Date-f.start){var g=a.coordsChar(d.activeTouch,"page"),f=!f.prev||c(f,f.prev)?new z(g,g):!f.prev.prev||c(f,f.prev.prev)?a.findWordAt(g):new z(r(g.line,0),w(a.doc,r(g.line+1,0)));a.setSelection(f.anchor,f.head);a.focus();O(e)}b()});v(d.scroller,"touchcancel",b);v(d.scroller,"scroll",
88function(){d.scroller.clientHeight&&(lb(a,d.scroller.scrollTop),Ma(a,d.scroller.scrollLeft,!0),K(a,"scroll",a))});v(d.scroller,"mousewheel",function(b){re(a,b)});v(d.scroller,"DOMMouseScroll",function(b){re(a,b)});v(d.wrapper,"scroll",function(){d.wrapper.scrollTop=d.wrapper.scrollLeft=0});d.dragFunctions={simple:function(b){ja(a,b)||jd(b)},start:function(b){if(B&&(!a.state.draggingText||100>+new Date-se))jd(b);else if(!ja(a,b)&&!oa(a.display,b)&&(b.dataTransfer.setData("Text",a.getSelection()),b.dataTransfer.setDragImage&&
89!te)){var c=t("img",null,null,"position: fixed; left: 0; top: 0;");c.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw\x3d\x3d";ba&&(c.width=c.height=1,a.display.wrapper.appendChild(c),c._top=c.offsetTop);b.dataTransfer.setDragImage(c,0,0);ba&&c.parentNode.removeChild(c)}},drop:G(a,Hf)};var g=d.input.getField();v(g,"keyup",function(b){ue.call(a,b)});v(g,"keydown",G(a,ve));v(g,"keypress",G(a,we));v(g,"focus",cb(xc,a));v(g,"blur",cb(db,a))}function If(a){var b=a.display;
90if(b.lastWrapHeight!=b.wrapper.clientHeight||b.lastWrapWidth!=b.wrapper.clientWidth)b.cachedCharWidth=b.cachedTextHeight=b.cachedPaddingH=null,b.scrollbarsClipped=!1,a.setSize()}function oa(a,b){for(var c=b.target||b.srcElement;c!=a.wrapper;c=c.parentNode)if(!c||1==c.nodeType&&"true"==c.getAttribute("cm-ignore-events")||c.parentNode==a.sizer&&c!=a.mover)return!0}function Ua(a,b,c,d){var e=a.display;if(!c&&"true"==(b.target||b.srcElement).getAttribute("cm-not-content"))return null;var f,g;c=e.lineSpace.getBoundingClientRect();
91try{f=b.clientX-c.left,g=b.clientY-c.top}catch(h){return null}b=fd(a,f,g);var k;d&&1==b.xRel&&(k=u(a.doc,b.line).text).length==b.ch&&(d=aa(k,k.length,a.options.tabSize)-k.length,b=r(b.line,Math.max(0,Math.round((f-ie(a.display).left)/gb(a.display))-d)));return b}function pe(a){var b=this.display;if(!(b.activeTouch&&b.input.supportsTouch()||ja(this,a)))if(b.shift=a.shiftKey,oa(b,a))J||(b.scroller.draggable=!1,setTimeout(function(){b.scroller.draggable=!0},100));else if(!hd(this,a,"gutterClick",!0,
92L)){var c=Ua(this,a);window.focus();switch(xe(a)){case 1:c?Jf(this,a,c):(a.target||a.srcElement)==b.scroller&&O(a);break;case 2:J&&(this.state.lastMiddleDown=+new Date);c&&Ub(this.doc,c);setTimeout(function(){b.input.focus()},20);O(a);break;case 3:id?qe(this,a):Kf(this)}}}function Jf(a,b,c){B?setTimeout(cb(Ud,a),0):a.curOp.focus=fa();var d=+new Date,e;ec&&ec.time>d-400&&0==y(ec.pos,c)?e="triple":fc&&fc.time>d-400&&0==y(fc.pos,c)?(e="double",ec={time:d,pos:c}):(e="single",fc={time:d,pos:c});var d=
93a.doc.sel,f=W?b.metaKey:b.ctrlKey,g;a.options.dragDrop&&Lf&&!Rb(a)&&"single"==e&&-1<(g=d.contains(c))&&!d.ranges[g].empty()?Mf(a,b,c,f):Nf(a,b,c,e,f)}function Mf(a,b,c,d){var e=a.display,f=+new Date,g=G(a,function(h){J&&(e.scroller.draggable=!1);a.state.draggingText=!1;ka(document,"mouseup",g);ka(e.scroller,"drop",g);10>Math.abs(b.clientX-h.clientX)+Math.abs(b.clientY-h.clientY)&&(O(h),!d&&+new Date-200<f&&Ub(a.doc,c),J||B&&9==C?setTimeout(function(){document.body.focus();e.input.focus()},20):e.input.focus())});
94J&&(e.scroller.draggable=!0);a.state.draggingText=g;e.scroller.dragDrop&&e.scroller.dragDrop();v(document,"mouseup",g);v(e.scroller,"drop",g)}function Nf(a,b,c,d,e){function f(b){if(0!=y(x,b))if(x=b,"rect"==d){for(var e=[],f=a.options.tabSize,g=aa(u(l,c.line).text,c.ch,f),h=aa(u(l,b.line).text,b.ch,f),k=Math.min(g,h),g=Math.max(g,h),h=Math.min(c.line,b.line),q=Math.min(a.lastLine(),Math.max(c.line,b.line));h<=q;h++){var E=u(l,h).text,t=ye(E,k,f);k==g?e.push(new z(r(h,t),r(h,t))):E.length>t&&e.push(new z(r(h,
95t),r(h,ye(E,g,f))))}e.length||e.push(new z(c,c));H(l,Z(n.ranges.slice(0,p).concat(e),p),{origin:"*mouse",scroll:!1});a.scrollIntoView(b)}else e=m,f=e.anchor,k=b,"single"!=d&&(b="double"==d?a.findWordAt(b):new z(r(b.line,0),w(l,r(b.line+1,0))),0<y(b.anchor,f)?(k=b.head,f=Qb(e.from(),b.anchor)):(k=b.anchor,f=Pb(e.to(),b.head))),e=n.ranges.slice(0),e[p]=new z(w(l,f),k),H(l,Z(e,p),kd)}function g(b){var c=++A,e=Ua(a,b,!0,"rect"==d);if(e)if(0!=y(e,x)){a.curOp.focus=fa();f(e);var h=Hc(k,l);(e.line>=h.to||
96e.line<h.from)&&setTimeout(G(a,function(){A==c&&g(b)}),150)}else{var m=b.clientY<B.top?-20:b.clientY>B.bottom?20:0;m&&setTimeout(G(a,function(){A==c&&(k.scroller.scrollTop+=m,g(b))}),50)}}function h(a){A=Infinity;O(a);k.input.focus();ka(document,"mousemove",F);ka(document,"mouseup",C);l.history.lastSelOrigin=null}var k=a.display,l=a.doc;O(b);var m,p,n=l.sel,q=n.ranges;e&&!b.shiftKey?(p=l.sel.contains(c),m=-1<p?q[p]:new z(c,c)):(m=l.sel.primary(),p=l.sel.primIndex);if(b.altKey)d="rect",e||(m=new z(c,
97c)),c=Ua(a,b,!0,!0),p=-1;else if("double"==d){var t=a.findWordAt(c);m=a.display.shift||l.extend?rb(l,m,t.anchor,t.head):t}else"triple"==d?(t=new z(r(c.line,0),w(l,r(c.line+1,0))),m=a.display.shift||l.extend?rb(l,m,t.anchor,t.head):t):m=rb(l,m,c);e?-1==p?(p=q.length,H(l,Z(q.concat([m]),p),{scroll:!1,origin:"*mouse"})):1<q.length&&q[p].empty()&&"single"==d&&!b.shiftKey?(H(l,Z(q.slice(0,p).concat(q.slice(p+1)),0)),n=l.sel):Xc(l,p,m,kd):(p=0,H(l,new la([m],0),kd),n=l.sel);var x=c,B=k.wrapper.getBoundingClientRect(),
98A=0,F=G(a,function(a){xe(a)?g(a):h(a)}),C=G(a,h);v(document,"mousemove",F);v(document,"mouseup",C)}function hd(a,b,c,d,e){try{var f=b.clientX,g=b.clientY}catch(h){return!1}if(f>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&O(b);d=a.display;var k=d.lineDiv.getBoundingClientRect();if(g>k.bottom||!S(a,c))return ld(b);g-=k.top-d.viewOffset;for(k=0;k<a.options.gutters.length;++k){var l=d.gutters.childNodes[k];if(l&&l.getBoundingClientRect().right>=f)return f=Ba(a.doc,g),e(a,
99c,a,f,a.options.gutters[k],b),ld(b)}}function Hf(a){var b=this;if(!ja(b,a)&&!oa(b.display,a)){O(a);B&&(se=+new Date);var c=Ua(b,a,!0),d=a.dataTransfer.files;if(c&&!Rb(b))if(d&&d.length&&window.FileReader&&window.File){var e=d.length,f=Array(e),g=0;a=function(a,d){var h=new FileReader;h.onload=G(b,function(){f[d]=h.result;if(++g==e){c=w(b.doc,c);var a={from:c,to:c,text:sa(f.join("\n")),origin:"paste"};Oa(b.doc,a);be(b.doc,ga(c,ta(a)))}});h.readAsText(a)};for(var h=0;h<e;++h)a(d[h],h)}else if(b.state.draggingText&&
100-1<b.doc.sel.contains(c))b.state.draggingText(a),setTimeout(function(){b.display.input.focus()},20);else try{if(f=a.dataTransfer.getData("Text")){if(b.state.draggingText&&(W?!a.altKey:!a.ctrlKey))var k=b.listSelections();Vb(b.doc,ga(c,c));if(k)for(h=0;h<k.length;++h)wb(b.doc,"",k[h].anchor,k[h].head,"drag");b.replaceSelection(f,"around","paste");b.display.input.focus()}}catch(l){}}}function lb(a,b){2>Math.abs(a.doc.scrollTop-b)||(a.doc.scrollTop=b,wa||Pc(a,{top:b}),a.display.scroller.scrollTop!=b&&
101(a.display.scroller.scrollTop=b),a.display.scrollbars.setScrollTop(b),wa&&Pc(a),fb(a,100))}function Ma(a,b,c){(c?b==a.doc.scrollLeft:2>Math.abs(a.doc.scrollLeft-b))||(b=Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth),a.doc.scrollLeft=b,Bc(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft=b),a.display.scrollbars.setScrollLeft(b))}function re(a,b){var c=ze(b),d=c.x,c=c.y,e=a.display,f=e.scroller;if(d&&f.scrollWidth>f.clientWidth||c&&f.scrollHeight>f.clientHeight){if(c&&
102W&&J){var g=b.target,h=e.view;a:for(;g!=f;g=g.parentNode)for(var k=0;k<h.length;k++)if(h[k].node==g){a.display.currentWheelTarget=g;break a}}!d||wa||ba||null==R?(c&&null!=R&&(g=c*R,h=a.doc.scrollTop,k=h+e.wrapper.clientHeight,0>g?h=Math.max(0,h+g-50):k=Math.min(a.doc.height,k+g+50),Pc(a,{top:h,bottom:k})),20>gc&&(null==e.wheelStartX?(e.wheelStartX=f.scrollLeft,e.wheelStartY=f.scrollTop,e.wheelDX=d,e.wheelDY=c,setTimeout(function(){if(null!=e.wheelStartX){var a=f.scrollLeft-e.wheelStartX,b=f.scrollTop-
103e.wheelStartY,a=b&&e.wheelDY&&b/e.wheelDY||a&&e.wheelDX&&a/e.wheelDX;e.wheelStartX=e.wheelStartY=null;a&&(R=(R*gc+a)/(gc+1),++gc)}},200)):(e.wheelDX+=d,e.wheelDY+=c))):(c&&lb(a,Math.max(0,Math.min(f.scrollTop+c*R,f.scrollHeight-f.clientHeight))),Ma(a,Math.max(0,Math.min(f.scrollLeft+d*R,f.scrollWidth-f.clientWidth))),O(b),e.wheelStartX=null)}}function hc(a,b,c){if("string"==typeof b&&(b=ic[b],!b))return!1;a.display.input.ensurePolled();var d=a.display.shift,e=!1;try{Rb(a)&&(a.state.suppressEdits=
104!0),c&&(a.display.shift=!1),e=b(a)!=Ae}finally{a.display.shift=d,a.state.suppressEdits=!1}return e}function Of(a,b,c){for(var d=0;d<a.state.keyMaps.length;d++){var e=xb(b,a.state.keyMaps[d],c,a);if(e)return e}return a.options.extraKeys&&xb(b,a.options.extraKeys,c,a)||xb(b,a.options.keyMap,c,a)}function jc(a,b,c,d){var e=a.state.keySeq;if(e){if(Pf(b))return"handled";Qf.set(50,function(){a.state.keySeq==e&&(a.state.keySeq=null,a.display.input.reset())});b=e+" "+b}d=Of(a,b,d);"multi"==d&&(a.state.keySeq=
105b);"handled"==d&&L(a,"keyHandled",a,b,c);if("handled"==d||"multi"==d)O(c),Yc(a);return e&&!d&&/\'$/.test(b)?(O(c),!0):!!d}function Be(a,b){var c=Rf(b,!0);return c?b.shiftKey&&!a.state.keySeq?jc(a,"Shift-"+c,b,function(b){return hc(a,b,!0)})||jc(a,c,b,function(b){if("string"==typeof b?/^go[A-Z]/.test(b):b.motion)return hc(a,b)}):jc(a,c,b,function(b){return hc(a,b)}):!1}function Sf(a,b,c){return jc(a,"'"+c+"'",b,function(b){return hc(a,b,!0)})}function ve(a){this.curOp.focus=fa();if(!ja(this,a)){B&&
10611>C&&27==a.keyCode&&(a.returnValue=!1);var b=a.keyCode;this.display.shift=16==b||a.shiftKey;var c=Be(this,a);ba&&(md=c?b:null,!c&&88==b&&!Ce&&(W?a.metaKey:a.ctrlKey)&&this.replaceSelection("",null,"cut"));18!=b||/\bCodeMirror-crosshair\b/.test(this.display.lineDiv.className)||Tf(this)}}function Tf(a){function b(a){18!=a.keyCode&&a.altKey||(kb(c,"CodeMirror-crosshair"),ka(document,"keyup",b),ka(document,"mouseover",b))}var c=a.display.lineDiv;mb(c,"CodeMirror-crosshair");v(document,"keyup",b);v(document,
107"mouseover",b)}function ue(a){16==a.keyCode&&(this.doc.sel.shift=!1);ja(this,a)}function we(a){if(!(oa(this.display,a)||ja(this,a)||a.ctrlKey&&!a.altKey||W&&a.metaKey)){var b=a.keyCode,c=a.charCode;if(ba&&b==md)md=null,O(a);else if(!ba||a.which&&!(10>a.which)||!Be(this,a))if(b=String.fromCharCode(null==c?b:c),!Sf(this,a,b))this.display.input.onKeyPress(a)}}function Kf(a){a.state.delayingBlurEvent=!0;setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,db(a))},100)}function xc(a){a.state.delayingBlurEvent&&
108(a.state.delayingBlurEvent=!1);"nocursor"!=a.options.readOnly&&(a.state.focused||(K(a,"focus",a),a.state.focused=!0,mb(a.display.wrapper,"CodeMirror-focused"),a.curOp||a.display.selForContextMenu==a.doc.sel||(a.display.input.reset(),J&&setTimeout(function(){a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Yc(a))}function db(a){a.state.delayingBlurEvent||(a.state.focused&&(K(a,"blur",a),a.state.focused=!1,kb(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),
109setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function qe(a,b){var c;(c=oa(a.display,b))||(c=S(a,"gutterContextMenu")?hd(a,b,"gutterContextMenu",!1,K):!1);if(!c)a.display.input.onContextMenu(b)}function De(a,b){if(0>y(a,b.from))return a;if(0>=y(a,b.to))return ta(b);var c=a.line+b.text.length-(b.to.line-b.from.line)-1,d=a.ch;a.line==b.to.line&&(d+=ta(b).ch-b.to.ch);return r(c,d)}function nd(a,b){for(var c=[],d=0;d<a.sel.ranges.length;d++){var e=a.sel.ranges[d];c.push(new z(De(e.anchor,
110b),De(e.head,b)))}return Z(c,a.sel.primIndex)}function Ee(a,b,c){return a.line==b.line?r(c.line,a.ch-b.ch+c.ch):r(c.line+(a.line-b.line),a.ch)}function Fe(a,b,c){b={canceled:!1,from:b.from,to:b.to,text:b.text,origin:b.origin,cancel:function(){this.canceled=!0}};c&&(b.update=function(b,c,f,g){b&&(this.from=w(a,b));c&&(this.to=w(a,c));f&&(this.text=f);void 0!==g&&(this.origin=g)});K(a,"beforeChange",a,b);a.cm&&K(a.cm,"beforeChange",a.cm,b);return b.canceled?null:{from:b.from,to:b.to,text:b.text,origin:b.origin}}
111function Oa(a,b,c){if(a.cm){if(!a.cm.curOp)return G(a.cm,Oa)(a,b,c);if(a.cm.state.suppressEdits)return}if(S(a,"beforeChange")||a.cm&&S(a.cm,"beforeChange"))if(b=Fe(a,b,!0),!b)return;if(c=Ge&&!c&&Uf(a,b.from,b.to))for(var d=c.length-1;0<=d;--d)He(a,{from:c[d].from,to:c[d].to,text:d?[""]:b.text});else He(a,b)}function He(a,b){if(1!=b.text.length||""!=b.text[0]||0!=y(b.from,b.to)){var c=nd(a,b);Ie(a,b,c,a.cm?a.cm.curOp.id:NaN);yb(a,b,c,od(a,b));var d=[];Ga(a,function(a,c){c||-1!=D(d,a.history)||(Je(a.history,
112b),d.push(a.history));yb(a,b,null,od(a,b))})}}function kc(a,b,c){if(!a.cm||!a.cm.state.suppressEdits){for(var d=a.history,e,f=a.sel,g="undo"==b?d.done:d.undone,h="undo"==b?d.undone:d.done,k=0;k<g.length&&(e=g[k],c?!e.ranges||e.equals(a.sel):e.ranges);k++);if(k!=g.length){for(d.lastOrigin=d.lastSelOrigin=null;;)if(e=g.pop(),e.ranges){Wb(e,h);if(c&&!e.equals(a.sel)){H(a,e,{clearRedo:!1});return}f=e}else break;c=[];Wb(f,h);h.push({changes:c,generation:d.generation});d.generation=e.generation||++d.maxGeneration;
113d=S(a,"beforeChange")||a.cm&&S(a.cm,"beforeChange");for(k=e.changes.length-1;0<=k;--k){var l=e.changes[k];l.origin=b;if(d&&!Fe(a,l,!1)){g.length=0;break}c.push(pd(a,l));f=k?nd(a,l):A(g);yb(a,l,f,Ke(a,l));!k&&a.cm&&a.cm.scrollIntoView({from:l.from,to:ta(l)});var m=[];Ga(a,function(a,b){b||-1!=D(m,a.history)||(Je(a.history,l),m.push(a.history));yb(a,l,null,Ke(a,l))})}}}}function Le(a,b){if(0!=b&&(a.first+=b,a.sel=new la(ob(a.sel.ranges,function(a){return new z(r(a.anchor.line+b,a.anchor.ch),r(a.head.line+
114b,a.head.ch))}),a.sel.primIndex),a.cm)){Q(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;d<c.viewTo;d++)na(a.cm,d,"gutter")}}function yb(a,b,c,d){if(a.cm&&!a.cm.curOp)return G(a.cm,yb)(a,b,c,d);if(b.to.line<a.first)Le(a,b.text.length-1-(b.to.line-b.from.line));else if(!(b.from.line>a.lastLine())){if(b.from.line<a.first){var e=b.text.length-1-(a.first-b.from.line);Le(a,e);b={from:r(a.first,0),to:r(b.to.line+e,b.to.ch),text:[A(b.text)],origin:b.origin}}e=a.lastLine();b.to.line>e&&(b=
115{from:b.from,to:r(e,u(a,e).text.length),text:[b.text[0]],origin:b.origin});b.removed=Da(a,b.from,b.to);c||(c=nd(a,b));a.cm?Vf(a.cm,b,d):qd(a,b,d);Vb(a,c,ha)}}function Vf(a,b,c){var d=a.doc,e=a.display,f=b.from,g=b.to,h=!1,k=f.line;a.options.lineWrapping||(k=F(ia(u(d,f.line))),d.iter(k,g.line+1,function(a){if(a==e.maxLine)return h=!0}));-1<d.sel.contains(b.from,b.to)&&fe(a);qd(d,b,c,Id(a));a.options.lineWrapping||(d.iter(k,f.line+b.text.length,function(a){var b=Kb(a);b>e.maxLineLength&&(e.maxLine=
116a,e.maxLineLength=b,e.maxLineChanged=!0,h=!1)}),h&&(a.curOp.updateMaxLine=!0));d.frontier=Math.min(d.frontier,f.line);fb(a,400);c=b.text.length-(g.line-f.line)-1;b.full?Q(a):f.line!=g.line||1!=b.text.length||Me(a.doc,b)?Q(a,f.line,g.line+1,c):na(a,f.line,"text");c=S(a,"changes");if((d=S(a,"change"))||c)b={from:f,to:g,text:b.text,removed:b.removed,origin:b.origin},d&&L(a,"change",a,b),c&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(b);a.display.selForContextMenu=null}function wb(a,b,c,d,e){d||
117(d=c);if(0>y(d,c)){var f=d;d=c;c=f}"string"==typeof b&&(b=sa(b));Oa(a,{from:c,to:d,text:b,origin:e})}function cc(a,b,c,d,e){var f=a.display,g=xa(a.display);0>c&&(c=0);var h=a.curOp&&null!=a.curOp.scrollTop?a.curOp.scrollTop:f.scroller.scrollTop,k=Nc(a),l={};e-c>k&&(e=c+k);var m=a.doc.height+Ec(f),p=c<g,g=e>m-g;c<h?l.scrollTop=p?0:c:e>h+k&&(c=Math.min(c,(g?m:e)-k),c!=h&&(l.scrollTop=c));h=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:f.scroller.scrollLeft;a=pa(a)-(a.options.fixedGutter?f.gutters.offsetWidth:
1180);(f=d-b>a)&&(d=b+a);10>b?l.scrollLeft=0:b<h?l.scrollLeft=Math.max(0,b-(f?0:10)):d>a+h-3&&(l.scrollLeft=d+(f?0:10)-a);return l}function lc(a,b,c){null==b&&null==c||mc(a);null!=b&&(a.curOp.scrollLeft=(null==a.curOp.scrollLeft?a.doc.scrollLeft:a.curOp.scrollLeft)+b);null!=c&&(a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+c)}function Pa(a){mc(a);var b=a.getCursor(),c=b,d=b;a.options.lineWrapping||(c=b.ch?r(b.line,b.ch-1):b,d=r(b.line,b.ch+1));a.curOp.scrollToPos={from:c,
119to:d,margin:a.options.cursorScrollMargin,isCursor:!0}}function mc(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var c=oe(a,b.from),d=oe(a,b.to),b=cc(a,Math.min(c.left,d.left),Math.min(c.top,d.top)-b.margin,Math.max(c.right,d.right),Math.max(c.bottom,d.bottom)+b.margin);a.scrollTo(b.scrollLeft,b.scrollTop)}}function pb(a,b,c,d){var e=a.doc,f;null==c&&(c="add");"smart"==c&&(e.mode.indent?f=sb(a,b):c="prev");var g=a.options.tabSize,h=u(e,b),k=aa(h.text,null,g);h.stateAfter&&(h.stateAfter=
120null);var l=h.text.match(/^\s*/)[0],m;if(!d&&!/\S/.test(h.text))m=0,c="not";else if("smart"==c&&(m=e.mode.indent(f,h.text.slice(l.length),h.text),m==Ae||150<m)){if(!d)return;c="prev"}"prev"==c?m=b>e.first?aa(u(e,b-1).text,null,g):0:"add"==c?m=k+a.options.indentUnit:"subtract"==c?m=k-a.options.indentUnit:"number"==typeof c&&(m=k+c);m=Math.max(0,m);c="";d=0;if(a.options.indentWithTabs)for(a=Math.floor(m/g);a;--a)d+=g,c+="\t";d<m&&(c+=Ne(m-d));if(c!=l)return wb(e,c,r(b,0),r(b,l.length),"+input"),h.stateAfter=
121null,!0;for(a=0;a<e.sel.ranges.length;a++)if(g=e.sel.ranges[a],g.head.line==b&&g.head.ch<l.length){d=r(b,l.length);Xc(e,a,new z(d,d));break}}function nc(a,b,c,d){var e=b,f=b;"number"==typeof b?f=u(a,Math.max(a.first,Math.min(b,a.first+a.size-1))):e=F(b);if(null==e)return null;d(f,e)&&a.cm&&na(a.cm,e,c);return f}function Va(a,b){for(var c=a.doc.sel.ranges,d=[],e=0;e<c.length;e++){for(var f=b(c[e]);d.length&&0>=y(f.from,A(d).to);){var g=d.pop();if(0>y(g.from,f.from)){f.from=g.from;break}}d.push(f)}T(a,
122function(){for(var b=d.length-1;0<=b;b--)wb(a.doc,"",d[b].from,d[b].to,"+delete");Pa(a)})}function rd(a,b,c,d,e){function f(b){var d=(e?gd:Oe)(l,h,c,!0);if(null==d){if(b=!b)b=g+c,b<a.first||b>=a.first+a.size?b=m=!1:(g=b,b=l=u(a,b));if(b)h=e?(0>c?bc:ac)(l):0>c?l.text.length:0;else return m=!1}else h=d;return!0}var g=b.line,h=b.ch,k=c,l=u(a,g),m=!0;if("char"==d)f();else if("column"==d)f(!0);else if("word"==d||"group"==d){var p=null;d="group"==d;b=a.cm&&a.cm.getHelper(b,"wordChars");for(var n=!0;!(0>
123c)||f(!n);n=!1){var q=l.text.charAt(h)||"\n",q=oc(q,b)?"w":d&&"\n"==q?"n":!d||/\s/.test(q)?null:"p";!d||n||q||(q="s");if(p&&p!=q){0>c&&(c=1,f());break}q&&(p=q);if(0<c&&!f(!n))break}}k=Xb(a,r(g,h),k,!0);m||(k.hitSide=!0);return k}function Pe(a,b,c,d){var e=a.doc,f=b.left,g;"page"==d?(g=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),g=b.top+c*(g-(0>c?1.5:.5)*xa(a.display))):"line"==d&&(g=0<c?b.bottom+3:b.top-3);for(;;){b=fd(a,f,g);if(!b.outside)break;
124if(0>c?0>=g:g>=e.height){b.hitSide=!0;break}g+=5*c}return b}function x(a,b,c,d){q.defaults[a]=b;c&&(Ka[a]=d?function(a,b,d){d!=Fd&&c(a,b,d)}:c)}function Wf(a){var b=a.split(/-(?!$)/);a=b[b.length-1];for(var c,d,e,f,g=0;g<b.length-1;g++){var h=b[g];if(/^(cmd|meta|m)$/i.test(h))f=!0;else if(/^a(lt)?$/i.test(h))c=!0;else if(/^(c|ctrl|control)$/i.test(h))d=!0;else if(/^s(hift)$/i.test(h))e=!0;else throw Error("Unrecognized modifier name: "+h);}c&&(a="Alt-"+a);d&&(a="Ctrl-"+a);f&&(a="Cmd-"+a);e&&(a="Shift-"+
125a);return a}function pc(a){return"string"==typeof a?ua[a]:a}function Wa(a,b,c,d,e){if(d&&d.shared)return Xf(a,b,c,d,e);if(a.cm&&!a.cm.curOp)return G(a.cm,Wa)(a,b,c,d,e);var f=new Ha(a,e);e=y(b,c);d&&V(d,f,!1);if(0<e||0==e&&!1!==f.clearWhenEmpty)return f;f.replacedWith&&(f.collapsed=!0,f.widgetNode=t("span",[f.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||f.widgetNode.setAttribute("cm-ignore-events","true"),d.insertLeft&&(f.widgetNode.insertLeft=!0));if(f.collapsed){if(Qe(a,b.line,b,c,f)||
126b.line!=c.line&&Qe(a,c.line,b,c,f))throw Error("Inserting collapsed marker partially overlapping an existing one");ra=!0}f.addToHistory&&Ie(a,{from:b,to:c,origin:"markText"},a.sel,NaN);var g=b.line,h=a.cm,k;a.iter(g,c.line+1,function(a){h&&f.collapsed&&!h.options.lineWrapping&&ia(a)==h.display.maxLine&&(k=!0);f.collapsed&&g!=b.line&&ca(a,0);var d=new qc(f,g==b.line?b.ch:null,g==c.line?c.ch:null);a.markedSpans=a.markedSpans?a.markedSpans.concat([d]):[d];d.marker.attachLine(a);++g});f.collapsed&&a.iter(b.line,
127c.line+1,function(b){ya(a,b)&&ca(b,0)});f.clearOnEnter&&v(f,"beforeCursorEnter",function(){f.clear()});f.readOnly&&(Ge=!0,(a.history.done.length||a.history.undone.length)&&a.clearHistory());f.collapsed&&(f.id=++sd,f.atomic=!0);if(h){k&&(h.curOp.updateMaxLine=!0);if(f.collapsed)Q(h,b.line,c.line+1);else if(f.className||f.title||f.startStyle||f.endStyle||f.css)for(d=b.line;d<=c.line;d++)na(h,d,"text");f.atomic&&ge(h.doc);L(h,"markerAdded",h,f)}return f}function Xf(a,b,c,d,e){d=V(d);d.shared=!1;var f=
128[Wa(a,b,c,d,e)],g=f[0],h=d.widgetNode;Ga(a,function(a){h&&(d.widgetNode=h.cloneNode(!0));f.push(Wa(a,w(a,b),w(a,c),d,e));for(var l=0;l<a.linked.length;++l)if(a.linked[l].isParent)return;g=A(f)});return new rc(f,g)}function Re(a){return a.findMarks(r(a.first,0),a.clipPos(r(a.lastLine())),function(a){return a.parent})}function Yf(a){for(var b=0;b<a.length;b++){var c=a[b],d=[c.primary.doc];Ga(c.primary.doc,function(a){d.push(a)});for(var e=0;e<c.markers.length;e++){var f=c.markers[e];-1==D(d,f.doc)&&
129(f.parent=null,c.markers.splice(e--,1))}}}function qc(a,b,c){this.marker=a;this.from=b;this.to=c}function zb(a,b){if(a)for(var c=0;c<a.length;++c){var d=a[c];if(d.marker==b)return d}}function od(a,b){if(b.full)return null;var c=qb(a,b.from.line)&&u(a,b.from.line).markedSpans,d=qb(a,b.to.line)&&u(a,b.to.line).markedSpans;if(!c&&!d)return null;var e=b.from.ch,f=b.to.ch,g=0==y(b.from,b.to);if(c)for(var h=0,k;h<c.length;++h){var l=c[h],m=l.marker;if(null==l.from||(m.inclusiveLeft?l.from<=e:l.from<e)||
130!(l.from!=e||"bookmark"!=m.type||g&&l.marker.insertLeft)){var p=null==l.to||(m.inclusiveRight?l.to>=e:l.to>e);(k||(k=[])).push(new qc(m,l.from,p?null:l.to))}}c=k;if(d)for(var h=0,n;h<d.length;++h)if(k=d[h],l=k.marker,null==k.to||(l.inclusiveRight?k.to>=f:k.to>f)||k.from==f&&"bookmark"==l.type&&(!g||k.marker.insertLeft))m=null==k.from||(l.inclusiveLeft?k.from<=f:k.from<f),(n||(n=[])).push(new qc(l,m?null:k.from-f,null==k.to?null:k.to-f));d=n;g=1==b.text.length;n=A(b.text).length+(g?e:0);if(c)for(f=
1310;f<c.length;++f)if(h=c[f],null==h.to)(k=zb(d,h.marker),k)?g&&(h.to=null==k.to?null:k.to+n):h.to=e;if(d)for(f=0;f<d.length;++f)h=d[f],null!=h.to&&(h.to+=n),null==h.from?(k=zb(c,h.marker),k||(h.from=n,g&&(c||(c=[])).push(h))):(h.from+=n,g&&(c||(c=[])).push(h));c&&(c=Se(c));d&&d!=c&&(d=Se(d));e=[c];if(!g){var g=b.text.length-2,q;if(0<g&&c)for(f=0;f<c.length;++f)null==c[f].to&&(q||(q=[])).push(new qc(c[f].marker,null,null));for(f=0;f<g;++f)e.push(q);e.push(d)}return e}function Se(a){for(var b=0;b<a.length;++b){var c=
132a[b];null!=c.from&&c.from==c.to&&!1!==c.marker.clearWhenEmpty&&a.splice(b--,1)}return a.length?a:null}function Ke(a,b){var c;if(c=b["spans_"+a.id]){for(var d=0,e=[];d<b.text.length;++d)e.push(Zf(c[d]));c=e}else c=null;d=od(a,b);if(!c)return d;if(!d)return c;for(e=0;e<c.length;++e){var f=c[e],g=d[e];if(f&&g){var h=0;a:for(;h<g.length;++h){for(var k=g[h],l=0;l<f.length;++l)if(f[l].marker==k.marker)continue a;f.push(k)}}else g&&(c[e]=g)}return c}function Uf(a,b,c){var d=null;a.iter(b.line,c.line+1,function(a){if(a.markedSpans)for(var b=
1330;b<a.markedSpans.length;++b){var c=a.markedSpans[b].marker;!c.readOnly||d&&-1!=D(d,c)||(d||(d=[])).push(c)}});if(!d)return null;a=[{from:b,to:c}];for(b=0;b<d.length;++b){c=d[b];for(var e=c.find(0),f=0;f<a.length;++f){var g=a[f];if(!(0>y(g.to,e.from)||0<y(g.from,e.to))){var h=[f,1],k=y(g.from,e.from),l=y(g.to,e.to);(0>k||!c.inclusiveLeft&&!k)&&h.push({from:g.from,to:e.from});(0<l||!c.inclusiveRight&&!l)&&h.push({from:e.to,to:g.to});a.splice.apply(a,h);f+=h.length-1}}}return a}function Te(a){var b=
134a.markedSpans;if(b){for(var c=0;c<b.length;++c)b[c].marker.detachLine(a);a.markedSpans=null}}function Ue(a,b){if(b){for(var c=0;c<b.length;++c)b[c].marker.attachLine(a);a.markedSpans=b}}function Ve(a,b){var c=a.lines.length-b.lines.length;if(0!=c)return c;var c=a.find(),d=b.find(),e=y(c.from,d.from)||(a.inclusiveLeft?-1:0)-(b.inclusiveLeft?-1:0);return e?-e:(c=y(c.to,d.to)||(a.inclusiveRight?1:0)-(b.inclusiveRight?1:0))?c:b.id-a.id}function Aa(a,b){var c=ra&&a.markedSpans,d;if(c)for(var e,f=0;f<c.length;++f)e=
135c[f],e.marker.collapsed&&null==(b?e.from:e.to)&&(!d||0>Ve(d,e.marker))&&(d=e.marker);return d}function Qe(a,b,c,d,e){a=u(a,b);if(a=ra&&a.markedSpans)for(b=0;b<a.length;++b){var f=a[b];if(f.marker.collapsed){var g=f.marker.find(0),h=y(g.from,c)||(f.marker.inclusiveLeft?-1:0)-(e.inclusiveLeft?-1:0),k=y(g.to,d)||(f.marker.inclusiveRight?1:0)-(e.inclusiveRight?1:0);if(!(0<=h&&0>=k||0>=h&&0<=k)&&(0>=h&&(0<y(g.to,c)||f.marker.inclusiveRight&&e.inclusiveLeft)||0<=h&&(0>y(g.from,d)||f.marker.inclusiveLeft&&
136e.inclusiveRight)))return!0}}}function ia(a){for(var b;b=Aa(a,!0);)a=b.find(-1,!0).line;return a}function Mc(a,b){var c=u(a,b),d=ia(c);return c==d?b:F(d)}function Ld(a,b){if(b>a.lastLine())return b;var c=u(a,b),d;if(!ya(a,c))return b;for(;d=Aa(c,!1);)c=d.find(1,!0).line;return F(c)+1}function ya(a,b){var c=ra&&b.markedSpans;if(c)for(var d,e=0;e<c.length;++e)if(d=c[e],d.marker.collapsed&&(null==d.from||!d.marker.widgetNode&&0==d.from&&d.marker.inclusiveLeft&&td(a,b,d)))return!0}function td(a,b,c){if(null==
137c.to)return b=c.marker.find(1,!0),td(a,b.line,zb(b.line.markedSpans,c.marker));if(c.marker.inclusiveRight&&c.to==b.text.length)return!0;for(var d,e=0;e<b.markedSpans.length;++e)if(d=b.markedSpans[e],d.marker.collapsed&&!d.marker.widgetNode&&d.from==c.to&&(null==d.to||d.to!=c.from)&&(d.marker.inclusiveLeft||c.marker.inclusiveRight)&&td(a,b,d))return!0}function ub(a){if(null!=a.height)return a.height;var b=a.doc.cm;if(!b)return 0;if(!Wc(document.body,a.node)){var c="position: relative;";a.coverGutter&&
138(c+="margin-left: -"+b.display.gutters.offsetWidth+"px;");a.noHScroll&&(c+="width: "+b.display.wrapper.clientWidth+"px;");U(b.display.measure,t("div",[a.node],null,c))}return a.height=a.node.offsetHeight}function $f(a,b,c,d){var e=new sc(a,c,d),f=a.cm;f&&e.noHScroll&&(f.display.alignWidgets=!0);nc(a,b,"widget",function(b){var c=b.widgets||(b.widgets=[]);null==e.insertAt?c.push(e):c.splice(Math.min(c.length-1,Math.max(0,e.insertAt)),0,e);e.line=b;f&&!ya(a,b)&&(c=ea(b)<a.scrollTop,ca(b,b.height+ub(e)),
139c&&lc(f,null,e.height),f.curOp.forceUpdate=!0);return!0});return e}function We(a,b){if(a)for(;;){var c=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!c)break;a=a.slice(0,c.index)+a.slice(c.index+c[0].length);var d=c[1]?"bgClass":"textClass";null==b[d]?b[d]=c[2]:(new RegExp("(?:^|s)"+c[2]+"(?:$|s)")).test(b[d])||(b[d]+=" "+c[2])}return a}function Xe(a,b){if(a.blankLine)return a.blankLine(b);if(a.innerMode){var c=q.innerMode(a,b);if(c.mode.blankLine)return c.mode.blankLine(c.state)}}function ud(a,
140b,c,d){for(var e=0;10>e;e++){d&&(d[0]=q.innerMode(a,c).mode);var f=a.token(b,c);if(b.pos>b.start)return f}throw Error("Mode "+a.name+" failed to advance stream.");}function Ye(a,b,c,d){function e(a){return{start:m.start,end:m.pos,string:m.current(),type:h||null,state:a?Sa(f.mode,l):l}}var f=a.doc,g=f.mode,h;b=w(f,b);var k=u(f,b.line),l=sb(a,b.line,c),m=new tc(k.text,a.options.tabSize),p;for(d&&(p=[]);(d||m.pos<b.ch)&&!m.eol();)m.start=m.pos,h=ud(g,m,l),d&&p.push(e(!0));return d?p:e()}function Ze(a,
141b,c,d,e,f,g){var h=c.flattenSpans;null==h&&(h=a.options.flattenSpans);var k=0,l=null,m=new tc(b,a.options.tabSize),p,n=a.options.addModeClass&&[null];for(""==b&&We(Xe(c,d),f);!m.eol();){m.pos>a.options.maxHighlightLength?(h=!1,g&&Zc(a,b,d,m.pos),m.pos=b.length,p=null):p=We(ud(c,m,d,n),f);if(n){var q=n[0].name;q&&(p="m-"+(p?q+" "+p:q))}if(!h||l!=p){for(;k<m.start;)k=Math.min(m.start,k+5E4),e(k,l);l=p}m.start=m.pos}for(;k<m.pos;)a=Math.min(m.pos,k+5E4),e(a,l),k=a}function je(a,b,c,d){var e=[a.state.modeGen],
142f={};Ze(a,b.text,a.doc.mode,c,function(a,b){e.push(a,b)},f,d);for(c=0;c<a.state.overlays.length;++c){var g=a.state.overlays[c],h=1,k=0;Ze(a,b.text,g.mode,!0,function(a,b){for(var c=h;k<a;){var d=e[h];d>a&&e.splice(h,1,a,e[h+1],d);h+=2;k=Math.min(a,d)}if(b)if(g.opaque)e.splice(c,h-c,a,"cm-overlay "+b),h=c+2;else for(;c<h;c+=2)d=e[c+1],e[c+1]=(d?d+" ":"")+"cm-overlay "+b},f)}return{styles:e,classes:f.bgClass||f.textClass?f:null}}function $e(a,b,c){if(!b.styles||b.styles[0]!=a.state.modeGen){var d=je(a,
143b,b.stateAfter=sb(a,F(b)));b.styles=d.styles;d.classes?b.styleClasses=d.classes:b.styleClasses&&(b.styleClasses=null);c===a.doc.frontier&&a.doc.frontier++}return b.styles}function Zc(a,b,c,d){var e=a.doc.mode,f=new tc(b,a.options.tabSize);f.start=f.pos=d||0;for(""==b&&Xe(e,c);!f.eol()&&f.pos<=a.options.maxHighlightLength;)ud(e,f,c),f.start=f.pos}function af(a,b){if(!a||/^\s*$/.test(a))return null;var c=b.addModeClass?ag:bg;return c[a]||(c[a]=a.replace(/\S+/g,"cm-$\x26"))}function Sd(a,b){var c=t("span",
144null,null,J?"padding-right: .1px":null),c={pre:t("pre",[c]),content:c,col:0,pos:0,cm:a,splitSpaces:(B||J)&&a.getOption("lineWrapping")};b.measure={};for(var d=0;d<=(b.rest?b.rest.length:0);d++){var e=d?b.rest[d-1]:b.line,f;c.pos=0;c.addToken=cg;var g;if(null!=vd)g=vd;else{g=U(a.display.measure,document.createTextNode("AخA"));var h=Ea(g,0,1).getBoundingClientRect();g=h&&h.left!=h.right?vd=3>Ea(g,1,2).getBoundingClientRect().right-h.right:!1}g&&(f=Y(e))&&(c.addToken=dg(c.addToken,f));c.map=[];h=b!=
145a.display.externalMeasured&&F(e);a:{g=c;var h=$e(a,e,h),k=e.markedSpans,l=e.text,m=0;if(k)for(var p=l.length,n=0,q=1,r="",u=void 0,v=void 0,w=0,x=void 0,y=void 0,A=void 0,C=void 0,z=void 0;;){if(w==n){for(var x=y=A=C=v="",z=null,w=Infinity,G=[],H=0;H<k.length;++H){var I=k[H],D=I.marker;"bookmark"==D.type&&I.from==n&&D.widgetNode?G.push(D):I.from<=n&&(null==I.to||I.to>n||D.collapsed&&I.to==n&&I.from==n)?(null!=I.to&&I.to!=n&&w>I.to&&(w=I.to,y=""),D.className&&(x+=" "+D.className),D.css&&(v=D.css),
146D.startStyle&&I.from==n&&(A+=" "+D.startStyle),D.endStyle&&I.to==w&&(y+=" "+D.endStyle),D.title&&!C&&(C=D.title),D.collapsed&&(!z||0>Ve(z.marker,D))&&(z=I)):I.from>n&&w>I.from&&(w=I.from)}if(z&&(z.from||0)==n){bf(g,(null==z.to?p+1:z.to)-n,z.marker,null==z.from);if(null==z.to)break a;z.to==n&&(z=!1)}if(!z&&G.length)for(H=0;H<G.length;++H)bf(g,0,G[H])}if(n>=p)break;for(G=Math.min(p,w);;){if(r){H=n+r.length;z||(I=H>G?r.slice(0,G-n):r,g.addToken(g,I,u?u+x:x,A,n+I.length==w?y:"",C,v));if(H>=G){r=r.slice(G-
147n);n=G;break}n=H;A=""}r=l.slice(m,m=h[q++]);u=af(h[q++],g.cm.options)}}else for(var q=1;q<h.length;q+=2)g.addToken(g,l.slice(m,m=h[q]),af(h[q+1],g.cm.options))}e.styleClasses&&(e.styleClasses.bgClass&&(c.bgClass=wd(e.styleClasses.bgClass,c.bgClass||"")),e.styleClasses.textClass&&(c.textClass=wd(e.styleClasses.textClass,c.textClass||"")));0==c.map.length&&c.map.push(0,0,c.content.appendChild(eg(a.display.measure)));0==d?(b.measure.map=c.map,b.measure.cache={}):((b.measure.maps||(b.measure.maps=[])).push(c.map),
148(b.measure.caches||(b.measure.caches=[])).push({}))}J&&/\bcm-tab\b/.test(c.content.lastChild.className)&&(c.content.className="cm-tab-wrap-hack");K(a,"renderLine",a,b.line,c.pre);c.pre.className&&(c.textClass=wd(c.pre.className,c.textClass||""));return c}function cg(a,b,c,d,e,f,g){if(b){var h=a.splitSpaces?b.replace(/ {3,}/g,fg):b,k=a.cm.state.specialChars,l=!1;if(k.test(b))for(var m=document.createDocumentFragment(),p=0;;){k.lastIndex=p;var n=k.exec(b),q=n?n.index-p:b.length-p;if(q){var r=document.createTextNode(h.slice(p,
149p+q));B&&9>C?m.appendChild(t("span",[r])):m.appendChild(r);a.map.push(a.pos,a.pos+q,r);a.col+=q;a.pos+=q}if(!n)break;p+=q+1;"\t"==n[0]?(r=a.cm.options.tabSize,n=r-a.col%r,r=m.appendChild(t("span",Ne(n),"cm-tab")),r.setAttribute("role","presentation"),r.setAttribute("cm-text","\t"),a.col+=n):(r=a.cm.options.specialCharPlaceholder(n[0]),r.setAttribute("cm-text",n[0]),B&&9>C?m.appendChild(t("span",[r])):m.appendChild(r),a.col+=1);a.map.push(a.pos,a.pos+1,r);a.pos++}else{a.col+=b.length;var m=document.createTextNode(h);
150a.map.push(a.pos,a.pos+b.length,m);B&&9>C&&(l=!0);a.pos+=b.length}if(c||d||e||l||g)return b=c||"",d&&(b+=d),e&&(b+=e),d=t("span",[m],b,g),f&&(d.title=f),a.content.appendChild(d);a.content.appendChild(m)}}function fg(a){for(var b=" ",c=0;c<a.length-2;++c)b+=c%2?" ":" ";return b+" "}function dg(a,b){return function(c,d,e,f,g,h,k){e=e?e+" cm-force-border":"cm-force-border";for(var l=c.pos,m=l+d.length;;){for(var p=0;p<b.length;p++){var n=b[p];if(n.to>l&&n.from<=l)break}if(n.to>=m)return a(c,d,e,f,g,
151h,k);a(c,d.slice(0,n.to-l),e,f,null,h,k);f=null;d=d.slice(n.to-l);l=n.to}}}function bf(a,b,c,d){var e=!d&&c.widgetNode;e&&a.map.push(a.pos,a.pos+b,e);!d&&a.cm.display.input.needsContentAttribute&&(e||(e=a.content.appendChild(document.createElement("span"))),e.setAttribute("cm-marker",c.id));e&&(a.cm.display.input.setUneditable(e),a.content.appendChild(e));a.pos+=b}function Me(a,b){return 0==b.from.ch&&0==b.to.ch&&""==A(b.text)&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function qd(a,b,c,d){function e(a,
152c,e){a.text=c;a.stateAfter&&(a.stateAfter=null);a.styles&&(a.styles=null);null!=a.order&&(a.order=null);Te(a);Ue(a,e);c=d?d(a):1;c!=a.height&&ca(a,c);L(a,"change",a,b)}function f(a,b){for(var e=a,f=[];e<b;++e)f.push(new Ab(k[e],c?c[e]:null,d));return f}var g=b.from,h=b.to,k=b.text,l=u(a,g.line),m=u(a,h.line),p=A(k),n=c?c[k.length-1]:null,q=h.line-g.line;if(b.full)a.insert(0,f(0,k.length)),a.remove(k.length,a.size-k.length);else if(Me(a,b)){var r=f(0,k.length-1);e(m,m.text,n);q&&a.remove(g.line,q);
153r.length&&a.insert(g.line,r)}else l==m?1==k.length?e(l,l.text.slice(0,g.ch)+p+l.text.slice(h.ch),n):(r=f(1,k.length-1),r.push(new Ab(p+l.text.slice(h.ch),n,d)),e(l,l.text.slice(0,g.ch)+k[0],c?c[0]:null),a.insert(g.line+1,r)):1==k.length?(e(l,l.text.slice(0,g.ch)+k[0]+m.text.slice(h.ch),c?c[0]:null),a.remove(g.line+1,q)):(e(l,l.text.slice(0,g.ch)+k[0],c?c[0]:null),e(m,p+m.text.slice(h.ch),n),r=f(1,k.length-1),1<q&&a.remove(g.line+1,q-1),a.insert(g.line+1,r));L(a,"change",a,b)}function Bb(a){this.lines=
154a;this.parent=null;for(var b=0,c=0;b<a.length;++b)a[b].parent=this,c+=a[b].height;this.height=c}function Cb(a){this.children=a;for(var b=0,c=0,d=0;d<a.length;++d){var e=a[d],b=b+e.chunkSize(),c=c+e.height;e.parent=this}this.size=b;this.height=c;this.parent=null}function Ga(a,b,c){function d(a,f,g){if(a.linked)for(var h=0;h<a.linked.length;++h){var k=a.linked[h];if(k.doc!=f){var l=g&&k.sharedHist;if(!c||l)b(k.doc,l),d(k.doc,a,l)}}}d(a,null,!0)}function Ed(a,b){if(b.cm)throw Error("This document is already in use.");
155a.doc=b;b.cm=a;Ac(a);zc(a);a.options.lineWrapping||Dc(a);a.options.mode=b.modeOption;Q(a)}function u(a,b){b-=a.first;if(0>b||b>=a.size)throw Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],f=e.chunkSize();if(b<f){c=e;break}b-=f}return c.lines[b]}function Da(a,b,c){var d=[],e=b.line;a.iter(b.line,c.line+1,function(a){a=a.text;e==c.line&&(a=a.slice(0,c.ch));e==b.line&&(a=a.slice(b.ch));d.push(a);++e});return d}function xd(a,b,c){var d=
156[];a.iter(b,c,function(a){d.push(a.text)});return d}function ca(a,b){var c=b-a.height;if(c)for(var d=a;d;d=d.parent)d.height+=c}function F(a){if(null==a.parent)return null;var b=a.parent;a=D(b.lines,a);for(var c=b.parent;c;b=c,c=c.parent)for(var d=0;c.children[d]!=b;++d)a+=c.children[d].chunkSize();return a+b.first}function Ba(a,b){var c=a.first;a:do{for(var d=0;d<a.children.length;++d){var e=a.children[d],f=e.height;if(b<f){a=e;continue a}b-=f;c+=e.chunkSize()}return c}while(!a.lines);for(d=0;d<
157a.lines.length;++d){e=a.lines[d].height;if(b<e)break;b-=e}return c+d}function ea(a){a=ia(a);for(var b=0,c=a.parent,d=0;d<c.lines.length;++d){var e=c.lines[d];if(e==a)break;else b+=e.height}for(a=c.parent;a;c=a,a=c.parent)for(d=0;d<a.children.length&&(e=a.children[d],e!=c);++d)b+=e.height;return b}function Y(a){var b=a.order;null==b&&(b=a.order=gg(a.text));return b}function uc(a){this.done=[];this.undone=[];this.undoDepth=Infinity;this.lastModTime=this.lastSelTime=0;this.lastOrigin=this.lastSelOrigin=
158this.lastOp=this.lastSelOp=null;this.generation=this.maxGeneration=a||1}function pd(a,b){var c={from:Rc(b.from),to:ta(b),text:Da(a,b.from,b.to)};cf(a,c,b.from.line,b.to.line+1);Ga(a,function(a){cf(a,c,b.from.line,b.to.line+1)},!0);return c}function ce(a){for(;a.length;)if(A(a).ranges)a.pop();else break}function Ie(a,b,c,d){var e=a.history;e.undone.length=0;var f=+new Date,g,h;if(h=e.lastOp==d||e.lastOrigin==b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>f-a.cm.options.historyEventDelay||
159"*"==b.origin.charAt(0)))e.lastOp==d?(ce(e.done),g=A(e.done)):e.done.length&&!A(e.done).ranges?g=A(e.done):1<e.done.length&&!e.done[e.done.length-2].ranges?(e.done.pop(),g=A(e.done)):g=void 0,h=g;if(h){var k=A(g.changes);0==y(b.from,b.to)&&0==y(b.from,k.to)?k.to=ta(b):g.changes.push(pd(a,b))}else for((g=A(e.done))&&g.ranges||Wb(a.sel,e.done),g={changes:[pd(a,b)],generation:e.generation},e.done.push(g);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift();e.done.push(c);e.generation=
160++e.maxGeneration;e.lastModTime=e.lastSelTime=f;e.lastOp=e.lastSelOp=d;e.lastOrigin=e.lastSelOrigin=b.origin;k||K(a,"historyAdded")}function Wb(a,b){var c=A(b);c&&c.ranges&&c.equals(a)||b.push(a)}function cf(a,b,c,d){var e=b["spans_"+a.id],f=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(c){c.markedSpans&&((e||(e=b["spans_"+a.id]={}))[f]=c.markedSpans);++f})}function Zf(a){if(!a)return null;for(var b=0,c;b<a.length;++b)a[b].marker.explicitlyCleared?c||(c=a.slice(0,b)):c&&c.push(a[b]);
161return c?c.length?c:null:a}function Xa(a,b,c){for(var d=0,e=[];d<a.length;++d){var f=a[d];if(f.ranges)e.push(c?la.prototype.deepCopy.call(f):f);else{var f=f.changes,g=[];e.push({changes:g});for(var h=0;h<f.length;++h){var k=f[h],l;g.push({from:k.from,to:k.to,text:k.text});if(b)for(var m in k)(l=m.match(/^spans_(\d+)$/))&&-1<D(b,Number(l[1]))&&(A(g)[m]=k[m],delete k[m])}}}return e}function df(a,b,c,d){c<a.line?a.line+=d:b<a.line&&(a.line=b,a.ch=0)}function ef(a,b,c,d){for(var e=0;e<a.length;++e){var f=
162a[e],g=!0;if(f.ranges){f.copied||(f=a[e]=f.deepCopy(),f.copied=!0);for(var h=0;h<f.ranges.length;h++)df(f.ranges[h].anchor,b,c,d),df(f.ranges[h].head,b,c,d)}else{for(h=0;h<f.changes.length;++h){var k=f.changes[h];if(c<k.from.line)k.from=r(k.from.line+d,k.from.ch),k.to=r(k.to.line+d,k.to.ch);else if(b<=k.to.line){g=!1;break}}g||(a.splice(0,e+1),e=0)}}}function Je(a,b){var c=b.from.line,d=b.to.line,e=b.text.length-(d-c)-1;ef(a.done,c,d,e);ef(a.undone,c,d,e)}function ld(a){return null!=a.defaultPrevented?
163a.defaultPrevented:0==a.returnValue}function xe(a){var b=a.which;null==b&&(a.button&1?b=1:a.button&2?b=3:a.button&4&&(b=2));W&&a.ctrlKey&&1==b&&(b=3);return b}function L(a,b){function c(a){return function(){a.apply(null,e)}}var d=a._handlers&&a._handlers[b];if(d){var e=Array.prototype.slice.call(arguments,2),f;Ta?f=Ta.delayedCallbacks:Db?f=Db:(f=Db=[],setTimeout(hg,0));for(var g=0;g<d.length;++g)f.push(c(d[g]))}}function hg(){var a=Db;Db=null;for(var b=0;b<a.length;++b)a[b]()}function ja(a,b,c){"string"==
164typeof b&&(b={type:b,preventDefault:function(){this.defaultPrevented=!0}});K(a,c||b.type,a,b);return ld(b)||b.codemirrorIgnore}function fe(a){var b=a._handlers&&a._handlers.cursorActivity;if(b){a=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]);for(var c=0;c<b.length;++c)-1==D(a,b[c])&&a.push(b[c])}}function S(a,b){var c=a._handlers&&a._handlers[b];return c&&0<c.length}function Ya(a){a.prototype.on=function(a,c){v(this,a,c)};a.prototype.off=function(a,c){ka(this,a,c)}}function bb(){this.id=
165null}function ye(a,b,c){for(var d=0,e=0;;){var f=a.indexOf("\t",d);-1==f&&(f=a.length);var g=f-d;if(f==a.length||e+g>=b)return d+Math.min(g,b-e);e+=f-d;e+=c-e%c;d=f+1;if(e>=b)return d}}function Ne(a){for(;vc.length<=a;)vc.push(A(vc)+" ");return vc[a]}function A(a){return a[a.length-1]}function D(a,b){for(var c=0;c<a.length;++c)if(a[c]==b)return c;return-1}function ob(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=b(a[d],d);return c}function Eb(){}function ff(a,b){var c;Object.create?c=Object.create(a):
166(Eb.prototype=a,c=new Eb);b&&V(b,c);return c}function V(a,b,c){b||(b={});for(var d in a)!a.hasOwnProperty(d)||!1===c&&b.hasOwnProperty(d)||(b[d]=a[d]);return b}function cb(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function oc(a,b){return b?-1<b.source.indexOf("\\w")&&gf(a)?!0:b.test(a):gf(a)}function hf(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function tb(a){return 768<=a.charCodeAt(0)&&ig.test(a)}function t(a,b,c,d){a=document.createElement(a);
167c&&(a.className=c);d&&(a.style.cssText=d);if("string"==typeof b)a.appendChild(document.createTextNode(b));else if(b)for(c=0;c<b.length;++c)a.appendChild(b[c]);return a}function za(a){for(var b=a.childNodes.length;0<b;--b)a.removeChild(a.firstChild);return a}function U(a,b){return za(a).appendChild(b)}function fa(){return document.activeElement}function Fb(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}function wd(a,b){for(var c=a.split(" "),d=0;d<c.length;d++)c[d]&&!Fb(c[d]).test(b)&&(b+=" "+c[d]);
168return b}function jf(a){if(document.body.getElementsByClassName)for(var b=document.body.getElementsByClassName("CodeMirror"),c=0;c<b.length;c++){var d=b[c].CodeMirror;d&&a(d)}}function tf(){var a;v(window,"resize",function(){null==a&&(a=setTimeout(function(){a=null;jf(If)},100))});v(window,"blur",function(){jf(db)})}function eg(a){if(null==yd){var b=t("span","​");U(a,t("span",[b,document.createTextNode("x")]));0!=a.firstChild.offsetHeight&&(yd=1>=b.offsetWidth&&2<b.offsetHeight&&!(B&&8>C))}a=yd?t("span",
169"​"):t("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");a.setAttribute("cm-text","");return a}function Af(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;f<a.length;++f){var g=a[f];if(g.from<c&&g.to>b||b==c&&g.to==b)d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0}e||d(b,c,"ltr")}function dd(a){return a.level%2?a.to:a.from}function ed(a){return a.level%2?a.from:a.to}function ac(a){return(a=Y(a))?dd(a[0]):0}function bc(a){var b=Y(a);return b?ed(A(b)):a.text.length}
170function kf(a,b){var c=u(a.doc,b),d=ia(c);d!=c&&(b=F(d));d=(c=Y(d))?c[0].level%2?bc(d):ac(d):0;return r(b,d)}function lf(a,b){var c=kf(a,b.line),d=u(a.doc,c.line),e=Y(d);return e&&0!=e[0].level?c:(d=Math.max(0,d.text.search(/\S/)),r(c.line,b.line==c.line&&b.ch<=d&&b.ch?0:d))}function Sb(a,b){vb=null;for(var c=0,d;c<a.length;++c){var e=a[c];if(e.from<b&&e.to>b)return c;if(e.from==b||e.to==b)if(null==d)d=c;else{var f;f=e.level;var g=a[d].level,h=a[0].level;f=f==h?!0:g==h?!1:f<g;if(f)return e.from!=
171e.to&&(vb=d),c;e.from!=e.to&&(vb=c);break}}return d}function zd(a,b,c,d){if(!d)return b+c;do b+=c;while(0<b&&tb(a.text.charAt(b)));return b}function gd(a,b,c,d){var e=Y(a);if(!e)return Oe(a,b,c,d);var f=Sb(e,b),g=e[f];for(b=zd(a,b,g.level%2?-c:c,d);;){if(b>g.from&&b<g.to)return b;if(b==g.from||b==g.to){if(Sb(e,b)==f)return b;g=e[f+c];return 0<c==g.level%2?g.to:g.from}g=e[f+=c];if(!g)return null;b=0<c==g.level%2?zd(a,g.to,-1,d):zd(a,g.from,1,d)}}function Oe(a,b,c,d){b+=c;if(d)for(;0<b&&tb(a.text.charAt(b));)b+=
172c;return 0>b||b>a.text.length?null:b}var wa=/gecko\/\d/i.test(navigator.userAgent),mf=/MSIE \d/.test(navigator.userAgent),nf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),B=mf||nf,C=B&&(mf?document.documentMode||6:nf[1]),J=/WebKit\//.test(navigator.userAgent),jg=J&&/Qt\/\d+\.\d+/.test(navigator.userAgent),kg=/Chrome\//.test(navigator.userAgent),ba=/Opera\//.test(navigator.userAgent),te=/Apple Computer/.test(navigator.vendor),lg=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),
173Gf=/PhantomJS/.test(navigator.userAgent),Qa=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),ab=Qa||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),W=Qa||/Mac/.test(navigator.platform),mg=/win/i.test(navigator.platform),Ia=ba&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Ia&&(Ia=Number(Ia[1]));Ia&&15<=Ia&&(ba=!1,J=!0);var of=W&&(jg||ba&&(null==Ia||12.11>Ia)),id=wa||B&&9<=C,Ge=!1,ra=!1;Fc.prototype=V({update:function(a){var b=
174a.scrollWidth>a.clientWidth+1,c=a.scrollHeight>a.clientHeight+1,d=a.nativeBarWidth;c?(this.vert.style.display="block",this.vert.style.bottom=b?d+"px":"0",this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+(a.viewHeight-(b?d:0)))+"px"):(this.vert.style.display="",this.vert.firstChild.style.height="0");b?(this.horiz.style.display="block",this.horiz.style.right=c?d+"px":"0",this.horiz.style.left=a.barLeft+"px",this.horiz.firstChild.style.width=a.scrollWidth-a.clientWidth+(a.viewWidth-
175a.barLeft-(c?d:0))+"px"):(this.horiz.style.display="",this.horiz.firstChild.style.width="0");!this.checkedOverlay&&0<a.clientHeight&&(0==d&&this.overlayHack(),this.checkedOverlay=!0);return{right:c?d:0,bottom:b?d:0}},setScrollLeft:function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a)},setScrollTop:function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a)},overlayHack:function(){this.horiz.style.minHeight=this.vert.style.minWidth=W&&!lg?"12px":"18px";var a=this,b=function(b){(b.target||
176b.srcElement)!=a.vert&&(b.target||b.srcElement)!=a.horiz&&G(a.cm,pe)(b)};v(this.vert,"mousedown",b);v(this.horiz,"mousedown",b)},clear:function(){var a=this.horiz.parentNode;a.removeChild(this.horiz);a.removeChild(this.vert)}},Fc.prototype);Gc.prototype=V({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},Gc.prototype);q.scrollbarModel={"native":Fc,"null":Gc};Mb.prototype.signal=function(a,b){S(a,b)&&this.events.push(arguments)};Mb.prototype.finish=
177function(){for(var a=0;a<this.events.length;a++)K.apply(null,this.events[a])};var r=q.Pos=function(a,b){if(!(this instanceof r))return new r(a,b);this.line=a;this.ch=b},y=q.cmpPos=function(a,b){return a.line-b.line||a.ch-b.ch},X=null;Tc.prototype=V({init:function(a){function b(a){if(d.somethingSelected())X=d.getSelections(),c.inaccurateSelection&&(c.prevInput="",c.inaccurateSelection=!1,f.value=X.join("\n"),Za(f));else if(d.options.lineWiseCopyCut){var b=Vd(d);X=b.text;"cut"==a.type?d.setSelections(b.ranges,
178null,ha):(c.prevInput="",f.value=b.text.join("\n"),Za(f))}else return;"cut"==a.type&&(d.state.cutIncoming=!0)}var c=this,d=this.cm,e=this.wrapper=Xd(),f=this.textarea=e.firstChild;a.wrapper.insertBefore(e,a.wrapper.firstChild);Qa&&(f.style.width="0px");v(f,"input",function(){B&&9<=C&&c.hasSelection&&(c.hasSelection=null);c.poll()});v(f,"paste",function(){if(J&&!d.state.fakedLastChar&&!(200>new Date-d.state.lastMiddleDown)){var a=f.selectionStart,b=f.selectionEnd;f.value+="$";f.selectionEnd=b;f.selectionStart=
179a;d.state.fakedLastChar=!0}d.state.pasteIncoming=!0;c.fastPoll()});v(f,"cut",b);v(f,"copy",b);v(a.scroller,"paste",function(b){oa(a,b)||(d.state.pasteIncoming=!0,c.focus())});v(a.lineSpace,"selectstart",function(b){oa(a,b)||O(b)});v(f,"compositionstart",function(){var a=d.getCursor("from");c.composing={start:a,range:d.markText(a,d.getCursor("to"),{className:"CodeMirror-composing"})}});v(f,"compositionend",function(){c.composing&&(c.poll(),c.composing.range.clear(),c.composing=null)})},prepareSelection:function(){var a=
180this.cm,b=a.display,c=a.doc,d=he(a);if(a.options.moveInputWithCursor){var a=ma(a,c.sel.primary().head,"div"),c=b.wrapper.getBoundingClientRect(),e=b.lineDiv.getBoundingClientRect();d.teTop=Math.max(0,Math.min(b.wrapper.clientHeight-10,a.top+e.top-c.top));d.teLeft=Math.max(0,Math.min(b.wrapper.clientWidth-10,a.left+e.left-c.left))}return d},showSelection:function(a){var b=this.cm.display;U(b.cursorDiv,a.cursors);U(b.selectionDiv,a.selection);null!=a.teTop&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=
181a.teLeft+"px")},reset:function(a){if(!this.contextMenuPending){var b,c,d=this.cm,e=d.doc;d.somethingSelected()?(this.prevInput="",b=e.sel.primary(),c=(b=Ce&&(100<b.to().line-b.from().line||1E3<(c=d.getSelection()).length))?"-":c||d.getSelection(),this.textarea.value=c,d.state.focused&&Za(this.textarea),B&&9<=C&&(this.hasSelection=c)):a||(this.prevInput=this.textarea.value="",B&&9<=C&&(this.hasSelection=null));this.inaccurateSelection=b}},getField:function(){return this.textarea},supportsTouch:function(){return!1},
182focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!ab||fa()!=this.textarea))try{this.textarea.focus()}catch(a){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var a=this;a.pollingFast||a.polling.set(this.cm.options.pollInterval,function(){a.poll();a.cm.state.focused&&a.slowPoll()})},fastPoll:function(){function a(){c.poll()||b?(c.pollingFast=!1,c.slowPoll()):(b=
183!0,c.polling.set(60,a))}var b=!1,c=this;c.pollingFast=!0;c.polling.set(20,a)},poll:function(){var a=this.cm,b=this.textarea,c=this.prevInput;if(!a.state.focused||ng(b)&&!c||Rb(a)||a.options.disableInput||a.state.keySeq)return!1;a.state.pasteIncoming&&a.state.fakedLastChar&&(b.value=b.value.substring(0,b.value.length-1),a.state.fakedLastChar=!1);var d=b.value;if(d==c&&!a.somethingSelected())return!1;if(B&&9<=C&&this.hasSelection===d||W&&/[\uf700-\uf7ff]/.test(d))return a.display.input.reset(),!1;if(a.doc.sel==
184a.display.selForContextMenu){var e=d.charCodeAt(0);8203!=e||c||(c="​");if(8666==e)return this.reset(),this.cm.execCommand("undo")}for(var f=0,e=Math.min(c.length,d.length);f<e&&c.charCodeAt(f)==d.charCodeAt(f);)++f;var g=this;T(a,function(){Sc(a,d.slice(f),c.length-f,null,g.composing?"*compose":null);1E3<d.length||-1<d.indexOf("\n")?b.value=g.prevInput="":g.prevInput=d;g.composing&&(g.composing.range.clear(),g.composing.range=a.markText(g.composing.start,a.getCursor("to"),{className:"CodeMirror-composing"}))});
185return!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){B&&9<=C&&(this.hasSelection=null);this.fastPoll()},onContextMenu:function(a){function b(){if(null!=g.selectionStart){var a=e.somethingSelected(),b="​"+(a?g.value:"");g.value="⇚";g.value=b;d.prevInput=a?"":"​";g.selectionStart=1;g.selectionEnd=b.length;f.selForContextMenu=e.doc.sel}}function c(){d.contextMenuPending=!1;d.wrapper.style.position="relative";g.style.cssText=l;B&&9>C&&f.scrollbars.setScrollTop(f.scroller.scrollTop=
186k);if(null!=g.selectionStart){(!B||B&&9>C)&&b();var a=0,c=function(){f.selForContextMenu==e.doc.sel&&0==g.selectionStart&&0<g.selectionEnd&&"​"==d.prevInput?G(e,ic.selectAll)(e):10>a++?f.detectingSelectAll=setTimeout(c,500):f.input.reset()};f.detectingSelectAll=setTimeout(c,200)}}var d=this,e=d.cm,f=e.display,g=d.textarea,h=Ua(e,a),k=f.scroller.scrollTop;if(h&&!ba){e.options.resetSelectionOnContextMenu&&-1==e.doc.sel.contains(h)&&G(e,H)(e.doc,ga(h),ha);var l=g.style.cssText;d.wrapper.style.position=
187"absolute";g.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(a.clientY-5)+"px; left: "+(a.clientX-5)+"px; z-index: 1000; background: "+(B?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity\x3d5);";if(J)var m=window.scrollY;f.input.focus();J&&window.scrollTo(null,m);f.input.reset();e.somethingSelected()||(g.value=d.prevInput=" ");d.contextMenuPending=!0;f.selForContextMenu=e.doc.sel;clearTimeout(f.detectingSelectAll);
188B&&9<=C&&b();if(id){jd(a);var p=function(){ka(window,"mouseup",p);setTimeout(c,20)};v(window,"mouseup",p)}else setTimeout(c,50)}},setUneditable:Eb,needsContentAttribute:!1},Tc.prototype);Uc.prototype=V({init:function(a){function b(a){if(d.somethingSelected())X=d.getSelections(),"cut"==a.type&&d.replaceSelection("",null,"cut");else if(d.options.lineWiseCopyCut){var b=Vd(d);X=b.text;"cut"==a.type&&d.operation(function(){d.setSelections(b.ranges,0,ha);d.replaceSelection("",null,"cut")})}else return;
189if(a.clipboardData&&!Qa)a.preventDefault(),a.clipboardData.clearData(),a.clipboardData.setData("text/plain",X.join("\n"));else{var c=Xd();a=c.firstChild;d.display.lineSpace.insertBefore(c,d.display.lineSpace.firstChild);a.value=X.join("\n");var h=document.activeElement;Za(a);setTimeout(function(){d.display.lineSpace.removeChild(c);h.focus()},50)}}var c=this,d=c.cm;a=c.div=a.lineDiv;a.contentEditable="true";Wd(a);v(a,"paste",function(a){var b=a.clipboardData&&a.clipboardData.getData("text/plain");
190b&&(a.preventDefault(),d.replaceSelection(b,null,"paste"))});v(a,"compositionstart",function(a){a=a.data;c.composing={sel:d.doc.sel,data:a,startData:a};if(a){var b=d.doc.sel.primary(),g=d.getLine(b.head.line).indexOf(a,Math.max(0,b.head.ch-a.length));-1<g&&g<=b.head.ch&&(c.composing.sel=ga(r(b.head.line,g),r(b.head.line,g+a.length)))}});v(a,"compositionupdate",function(a){c.composing.data=a.data});v(a,"compositionend",function(a){var b=c.composing;b&&(a.data==b.startData||/\u200b/.test(a.data)||(b.data=
191a.data),setTimeout(function(){b.handled||c.applyComposition(b);c.composing==b&&(c.composing=null)},50))});v(a,"touchstart",function(){c.forceCompositionEnd()});v(a,"input",function(){c.composing||c.pollContent()||T(c.cm,function(){Q(d)})});v(a,"copy",b);v(a,"cut",b)},prepareSelection:function(){var a=he(this.cm,!1);a.focus=this.cm.state.focused;return a},showSelection:function(a){a&&this.cm.display.view.length&&(a.focus&&this.showPrimarySelection(),this.showMultipleSelections(a))},showPrimarySelection:function(){var a=
192window.getSelection(),b=this.cm.doc.sel.primary(),c=Tb(this.cm,a.anchorNode,a.anchorOffset),d=Tb(this.cm,a.focusNode,a.focusOffset);if(!c||c.bad||!d||d.bad||0!=y(Qb(c,d),b.from())||0!=y(Pb(c,d),b.to()))if(c=Yd(this.cm,b.from()),d=Yd(this.cm,b.to()),c||d){var e=this.cm.display.view,b=a.rangeCount&&a.getRangeAt(0);c?d||(d=e[e.length-1].measure,d=d.maps?d.maps[d.maps.length-1]:d.map,d={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}):c={node:e[0].measure.map[2],offset:0};try{var f=Ea(c.node,c.offset,
193d.offset,d.node)}catch(g){}f&&(a.removeAllRanges(),a.addRange(f),b&&null==a.anchorNode?a.addRange(b):wa&&this.startGracePeriod());this.rememberSelection()}},startGracePeriod:function(){var a=this;clearTimeout(this.gracePeriod);this.gracePeriod=setTimeout(function(){a.gracePeriod=!1;a.selectionChanged()&&a.cm.operation(function(){a.cm.curOp.selectionChanged=!0})},20)},showMultipleSelections:function(a){U(this.cm.display.cursorDiv,a.cursors);U(this.cm.display.selectionDiv,a.selection)},rememberSelection:function(){var a=
194window.getSelection();this.lastAnchorNode=a.anchorNode;this.lastAnchorOffset=a.anchorOffset;this.lastFocusNode=a.focusNode;this.lastFocusOffset=a.focusOffset},selectionInEditor:function(){var a=window.getSelection();if(!a.rangeCount)return!1;a=a.getRangeAt(0).commonAncestorContainer;return Wc(this.div,a)},focus:function(){"nocursor"!=this.cm.options.readOnly&&this.div.focus()},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return!0},receivedFocus:function(){function a(){b.cm.state.focused&&
195(b.pollSelection(),b.polling.set(b.cm.options.pollInterval,a))}var b=this;this.selectionInEditor()?this.pollSelection():T(this.cm,function(){b.cm.curOp.selectionChanged=!0});this.polling.set(this.cm.options.pollInterval,a)},selectionChanged:function(){var a=window.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var a=
196window.getSelection(),b=this.cm;this.rememberSelection();var c=Tb(b,a.anchorNode,a.anchorOffset),d=Tb(b,a.focusNode,a.focusOffset);c&&d&&T(b,function(){H(b.doc,ga(c,d),ha);if(c.bad||d.bad)b.curOp.selectionChanged=!0})}},pollContent:function(){var a=this.cm,b=a.display,c=a.doc.sel.primary(),d=c.from(),c=c.to();if(d.line<b.viewFrom||c.line>b.viewTo-1)return!1;var e;d.line==b.viewFrom||0==(e=Ca(a,d.line))?(d=F(b.view[0].line),e=b.view[0].node):(d=F(b.view[e].line),e=b.view[e-1].node.nextSibling);var f=
197Ca(a,c.line);f==b.view.length-1?(c=b.viewTo-1,b=b.view[f].node):(c=F(b.view[f+1].line)-1,b=b.view[f+1].node.previousSibling);b=sa(xf(a,e,b,d,c));for(e=Da(a.doc,r(d,0),r(c,u(a.doc,c).text.length));1<b.length&&1<e.length;)if(A(b)==A(e))b.pop(),e.pop(),c--;else if(b[0]==e[0])b.shift(),e.shift(),d++;else break;for(var g=0,f=0,h=b[0],k=e[0],l=Math.min(h.length,k.length);g<l&&h.charCodeAt(g)==k.charCodeAt(g);)++g;h=A(b);k=A(e);for(l=Math.min(h.length-(1==b.length?g:0),k.length-(1==e.length?g:0));f<l&&h.charCodeAt(h.length-
198f-1)==k.charCodeAt(k.length-f-1);)++f;b[b.length-1]=h.slice(0,h.length-f);b[0]=b[0].slice(g);d=r(d,g);c=r(c,e.length?A(e).length-f:0);if(1<b.length||b[0]||y(d,c))return wb(a.doc,b,d,c,"+input"),!0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&!this.composing.handled&&(this.applyComposition(this.composing),this.composing.handled=!0,this.div.blur(),this.div.focus())},applyComposition:function(a){a.data&&
199a.data!=a.startData&&G(this.cm,Sc)(this.cm,a.data,0,a.sel)},setUneditable:function(a){a.setAttribute("contenteditable","false")},onKeyPress:function(a){a.preventDefault();G(this.cm,Sc)(this.cm,String.fromCharCode(null==a.charCode?a.keyCode:a.charCode),0)},onContextMenu:Eb,resetPosition:Eb,needsContentAttribute:!0},Uc.prototype);q.inputStyles={textarea:Tc,contenteditable:Uc};la.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(a){if(a==this)return!0;if(a.primIndex!=
200this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var b=0;b<this.ranges.length;b++){var c=this.ranges[b],d=a.ranges[b];if(0!=y(c.anchor,d.anchor)||0!=y(c.head,d.head))return!1}return!0},deepCopy:function(){for(var a=[],b=0;b<this.ranges.length;b++)a[b]=new z(Rc(this.ranges[b].anchor),Rc(this.ranges[b].head));return new la(a,this.primIndex)},somethingSelected:function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},contains:function(a,b){b||(b=a);
201for(var c=0;c<this.ranges.length;c++){var d=this.ranges[c];if(0<=y(b,d.from())&&0>=y(a,d.to()))return c}return-1}};z.prototype={from:function(){return Qb(this.anchor,this.head)},to:function(){return Pb(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var ad={left:0,right:0,top:0,bottom:0},Fa,Ta=null,Ff=0,fc,ec,se=0,gc=0,R=null;B?R=-.53:wa?R=15:kg?R=-.7:te&&(R=-1/3);var ze=function(a){var b=a.wheelDeltaX,c=a.wheelDeltaY;null==b&&a.detail&&
202a.axis==a.HORIZONTAL_AXIS&&(b=a.detail);null==c&&a.detail&&a.axis==a.VERTICAL_AXIS?c=a.detail:null==c&&(c=a.wheelDelta);return{x:b,y:c}};q.wheelEventPixels=function(a){a=ze(a);a.x*=R;a.y*=R;return a};var Qf=new bb,md=null,ta=q.changeEnd=function(a){return a.text?r(a.from.line+a.text.length-1,A(a.text).length+(1==a.text.length?a.from.ch:0)):a.to};q.prototype={constructor:q,focus:function(){window.focus();this.display.input.focus()},setOption:function(a,b){var c=this.options,d=c[a];if(c[a]!=b||"mode"==
203a)c[a]=b,Ka.hasOwnProperty(a)&&G(this,Ka[a])(this,b,d)},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](pc(a))},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;c<b.length;++c)if(b[c]==a||b[c].name==a)return b.splice(c,1),!0},addOverlay:M(function(a,b){var c=a.token?a:q.getMode(this.options,a);if(c.startState)throw Error("Overlays may not be stateful.");this.state.overlays.push({mode:c,modeSpec:a,
204opaque:b&&b.opaque});this.state.modeGen++;Q(this)}),removeOverlay:M(function(a){for(var b=this.state.overlays,c=0;c<b.length;++c){var d=b[c].modeSpec;if(d==a||"string"==typeof a&&d.name==a){b.splice(c,1);this.state.modeGen++;Q(this);break}}}),indentLine:M(function(a,b,c){"string"!=typeof b&&"number"!=typeof b&&(b=null==b?this.options.smartIndent?"smart":"prev":b?"add":"subtract");qb(this.doc,a)&&pb(this,a,b,c)}),indentSelection:M(function(a){for(var b=this.doc.sel.ranges,c=-1,d=0;d<b.length;d++){var e=
205b[d];if(e.empty())e.head.line>c&&(pb(this,e.head.line,a,!0),c=e.head.line,d==this.doc.sel.primIndex&&Pa(this));else{for(var f=e.from(),e=e.to(),g=Math.max(c,f.line),c=Math.min(this.lastLine(),e.line-(e.ch?0:1))+1,e=g;e<c;++e)pb(this,e,a);e=this.doc.sel.ranges;0==f.ch&&b.length==e.length&&0<e[d].from().ch&&Xc(this.doc,d,new z(f,e[d].to()),ha)}}}),getTokenAt:function(a,b){return Ye(this,a,b)},getLineTokens:function(a,b){return Ye(this,r(a),b,!0)},getTokenTypeAt:function(a){a=w(this.doc,a);var b=$e(this,
206u(this.doc,a.line)),c=0,d=(b.length-1)/2;a=a.ch;if(0==a)b=b[2];else for(;;){var e=c+d>>1;if((e?b[2*e-1]:0)>=a)d=e;else if(b[2*e+1]<a)c=e+1;else{b=b[2*e+2];break}}c=b?b.indexOf("cm-overlay "):-1;return 0>c?b:0==c?null:b.slice(0,c-1)},getModeAt:function(a){var b=this.doc.mode;return b.innerMode?q.innerMode(b,this.getTokenAt(a).state).mode:b},getHelper:function(a,b){return this.getHelpers(a,b)[0]},getHelpers:function(a,b){var c=[];if(!$a.hasOwnProperty(b))return c;var d=$a[b],e=this.getModeAt(a);if("string"==
207typeof e[b])d[e[b]]&&c.push(d[e[b]]);else if(e[b])for(var f=0;f<e[b].length;f++){var g=d[e[b][f]];g&&c.push(g)}else e.helperType&&d[e.helperType]?c.push(d[e.helperType]):d[e.name]&&c.push(d[e.name]);for(f=0;f<d._global.length;f++)g=d._global[f],g.pred(e,this)&&-1==D(c,g.val)&&c.push(g.val);return c},getStateAfter:function(a,b){var c=this.doc;a=Math.max(c.first,Math.min(null==a?c.first+c.size-1:a,c.first+c.size-1));return sb(this,a+1,b)},cursorCoords:function(a,b){var c;c=this.doc.sel.primary();c=
208null==a?c.head:"object"==typeof a?w(this.doc,a):a?c.from():c.to();return ma(this,c,b||"page")},charCoords:function(a,b){return Yb(this,w(this.doc,a),b||"page")},coordsChar:function(a,b){a=ne(this,a,b||"page");return fd(this,a.left,a.top)},lineAtHeight:function(a,b){a=ne(this,{top:a,left:0},b||"page").top;return Ba(this.doc,a+this.display.viewOffset)},heightAtLine:function(a,b){var c=!1,d;"number"==typeof a?(d=this.doc.first+this.doc.size-1,a<this.doc.first?a=this.doc.first:a>d&&(a=d,c=!0),d=u(this.doc,
209a)):d=a;return cd(this,d,{top:0,left:0},b||"page").top+(c?this.doc.height-ea(d):0)},defaultTextHeight:function(){return xa(this.display)},defaultCharWidth:function(){return gb(this.display)},setGutterMarker:M(function(a,b,c){return nc(this.doc,a,"gutter",function(a){var e=a.gutterMarkers||(a.gutterMarkers={});e[b]=c;!c&&hf(e)&&(a.gutterMarkers=null);return!0})}),clearGutter:M(function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,
210na(b,d,"gutter"),hf(c.gutterMarkers)&&(c.gutterMarkers=null));++d})}),lineInfo:function(a){if("number"==typeof a){if(!qb(this.doc,a))return null;var b=a;a=u(this.doc,a);if(!a)return null}else if(b=F(a),null==b)return null;return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=
211ma(this,w(this.doc,a));var g=a.bottom,h=a.left;b.style.position="absolute";b.setAttribute("cm-ignore-events","true");this.display.input.setUneditable(b);f.sizer.appendChild(b);if("over"==d)g=a.top;else if("above"==d||"near"==d){var k=Math.max(f.wrapper.clientHeight,this.doc.height),l=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);("above"==d||a.bottom+b.offsetHeight>k)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=k&&(g=a.bottom);h+b.offsetWidth>l&&(h=l-b.offsetWidth)}b.style.top=
212g+"px";b.style.left=b.style.right="";"right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px");c&&(a=cc(this,h,g,h+b.offsetWidth,g+b.offsetHeight),null!=a.scrollTop&&lb(this,a.scrollTop),null!=a.scrollLeft&&Ma(this,a.scrollLeft))},triggerOnKeyDown:M(ve),triggerOnKeyPress:M(we),triggerOnKeyUp:ue,execCommand:function(a){if(ic.hasOwnProperty(a))return ic[a](this)},findPosH:function(a,b,c,d){var e=1;
2130>b&&(e=-1,b=-b);var f=0;for(a=w(this.doc,a);f<b&&(a=rd(this.doc,a,e,c,d),!a.hitSide);++f);return a},moveH:M(function(a,b){var c=this;c.extendSelectionsBy(function(d){return c.display.shift||c.doc.extend||d.empty()?rd(c.doc,d.head,a,b,c.options.rtlMoveVisually):0>a?d.from():d.to()},Gb)}),deleteH:M(function(a,b){var c=this.doc;this.doc.sel.somethingSelected()?c.replaceSelection("",null,"+delete"):Va(this,function(d){var e=rd(c,d.head,a,b,!1);return 0>a?{from:e,to:d.head}:{from:d.head,to:e}})}),findPosV:function(a,
214b,c,d){var e=1;0>b&&(e=-1,b=-b);var f=0;for(a=w(this.doc,a);f<b&&(a=ma(this,a,"div"),null==d?d=a.left:a.left=d,a=Pe(this,a,e,c),!a.hitSide);++f);return a},moveV:M(function(a,b){var c=this,d=this.doc,e=[],f=!c.display.shift&&!d.extend&&d.sel.somethingSelected();d.extendSelectionsBy(function(g){if(f)return 0>a?g.from():g.to();var k=ma(c,g.head,"div");null!=g.goalColumn&&(k.left=g.goalColumn);e.push(k.left);var l=Pe(c,k,a,b);"page"==b&&g==d.sel.primary()&&lc(c,null,Yb(c,l,"div").top-k.top);return l},
215Gb);if(e.length)for(var g=0;g<d.sel.ranges.length;g++)d.sel.ranges[g].goalColumn=e[g]}),findWordAt:function(a){var b=u(this.doc,a.line).text,c=a.ch,d=a.ch;if(b){var e=this.getHelper(a,"wordChars");(0>a.xRel||d==b.length)&&c?--c:++d;for(var f=b.charAt(c),f=oc(f,e)?function(a){return oc(a,e)}:/\s/.test(f)?function(a){return/\s/.test(a)}:function(a){return!/\s/.test(a)&&!oc(a)};0<c&&f(b.charAt(c-1));)--c;for(;d<b.length&&f(b.charAt(d));)++d}return new z(r(a.line,c),r(a.line,d))},toggleOverwrite:function(a){if(null==
216a||a!=this.state.overwrite)(this.state.overwrite=!this.state.overwrite)?mb(this.display.cursorDiv,"CodeMirror-overwrite"):kb(this.display.cursorDiv,"CodeMirror-overwrite"),K(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==fa()},scrollTo:M(function(a,b){null==a&&null==b||mc(this);null!=a&&(this.curOp.scrollLeft=a);null!=b&&(this.curOp.scrollTop=b)}),getScrollInfo:function(){var a=this.display.scroller;return{left:a.scrollLeft,top:a.scrollTop,
217height:a.scrollHeight-da(this)-this.display.barHeight,width:a.scrollWidth-da(this)-this.display.barWidth,clientHeight:Nc(this),clientWidth:pa(this)}},scrollIntoView:M(function(a,b){null==a?(a={from:this.doc.sel.primary().head,to:null},null==b&&(b=this.options.cursorScrollMargin)):"number"==typeof a?a={from:r(a,0),to:null}:null==a.from&&(a={from:a,to:null});a.to||(a.to=a.from);a.margin=b||0;if(null!=a.from.line)mc(this),this.curOp.scrollToPos=a;else{var c=cc(this,Math.min(a.from.left,a.to.left),Math.min(a.from.top,
218a.to.top)-a.margin,Math.max(a.from.right,a.to.right),Math.max(a.from.bottom,a.to.bottom)+a.margin);this.scrollTo(c.scrollLeft,c.scrollTop)}}),setSize:M(function(a,b){function c(a){return"number"==typeof a||/^\d+$/.test(String(a))?a+"px":a}var d=this;null!=a&&(d.display.wrapper.style.width=c(a));null!=b&&(d.display.wrapper.style.height=c(b));d.options.lineWrapping&&me(this);var e=d.display.viewFrom;d.doc.iter(e,d.display.viewTo,function(a){if(a.widgets)for(var b=0;b<a.widgets.length;b++)if(a.widgets[b].noHScroll){na(d,
219e,"widget");break}++e});d.curOp.forceUpdate=!0;K(d,"refresh",this)}),operation:function(a){return T(this,a)},refresh:M(function(){var a=this.display.cachedTextHeight;Q(this);this.curOp.forceUpdate=!0;hb(this);this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop);Cc(this);(null==a||.5<Math.abs(a-xa(this.display)))&&Ac(this);K(this,"refresh",this)}),swapDoc:M(function(a){var b=this.doc;b.cm=null;Ed(this,a);hb(this);this.display.input.reset();this.scrollTo(a.scrollLeft,a.scrollTop);this.curOp.forceScroll=
220!0;L(this,"swapDoc",this,b);return b}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};Ya(q);var qf=q.defaults={},Ka=q.optionHandlers={},Fd=q.Init={toString:function(){return"CodeMirror.Init"}};x("value","",function(a,b){a.setValue(b)},!0);x("mode",null,function(a,b){a.doc.modeOption=b;zc(a)},!0);x("indentUnit",
2212,zc,!0);x("indentWithTabs",!1);x("smartIndent",!0);x("tabSize",4,function(a){eb(a);hb(a);Q(a)},!0);x("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(a,b,c){a.state.specialChars=new RegExp(b.source+(b.test("\t")?"":"|\t"),"g");c!=q.Init&&a.refresh()});x("specialCharPlaceholder",function(a){var b=t("span","•","cm-invalidchar");b.title="\\u"+a.charCodeAt(0).toString(16);b.setAttribute("aria-label",b.title);return b},function(a){a.refresh()},!0);x("electricChars",!0);
222x("inputStyle",ab?"contenteditable":"textarea",function(){throw Error("inputStyle can not (yet) be changed in a running editor");},!0);x("rtlMoveVisually",!mg);x("wholeLineUpdateBefore",!0);x("theme","default",function(a){Bd(a);ib(a)},!0);x("keyMap","default",function(a,b,c){b=pc(b);(c=c!=q.Init&&pc(c))&&c.detach&&c.detach(a,b);b.attach&&b.attach(a,c||null)});x("extraKeys",null);x("lineWrapping",!1,function(a){a.options.lineWrapping?(mb(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth=
223"",a.display.sizerWidth=null):(kb(a.display.wrapper,"CodeMirror-wrap"),Dc(a));Ac(a);Q(a);hb(a);setTimeout(function(){Na(a)},100)},!0);x("gutters",[],function(a){wc(a.options);ib(a)},!0);x("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?Ic(a.display)+"px":"0";a.refresh()},!0);x("coverGutterNextToScrollbar",!1,function(a){Na(a)},!0);x("scrollbarStyle","native",function(a){Cd(a);Na(a);a.display.scrollbars.setScrollTop(a.doc.scrollTop);a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},
224!0);x("lineNumbers",!1,function(a){wc(a.options);ib(a)},!0);x("firstLineNumber",1,ib,!0);x("lineNumberFormatter",function(a){return a},ib,!0);x("showCursorWhenSelecting",!1,nb,!0);x("resetSelectionOnContextMenu",!0);x("lineWiseCopyCut",!0);x("readOnly",!1,function(a,b){"nocursor"==b?(db(a),a.display.input.blur(),a.display.disabled=!0):(a.display.disabled=!1,b||a.display.input.reset())});x("disableInput",!1,function(a,b){b||a.display.input.reset()},!0);x("dragDrop",!0,function(a,b,c){!b!=!(c&&c!=q.Init)&&
225(c=a.display.dragFunctions,b=b?v:ka,b(a.display.scroller,"dragstart",c.start),b(a.display.scroller,"dragenter",c.simple),b(a.display.scroller,"dragover",c.simple),b(a.display.scroller,"drop",c.drop))});x("cursorBlinkRate",530);x("cursorScrollMargin",0);x("cursorHeight",1,nb,!0);x("singleCursorHeightPerLine",!0,nb,!0);x("workTime",100);x("workDelay",100);x("flattenSpans",!0,eb,!0);x("addModeClass",!1,eb,!0);x("pollInterval",100);x("undoDepth",200,function(a,b){a.doc.history.undoDepth=b});x("historyEventDelay",
2261250);x("viewportMargin",10,function(a){a.refresh()},!0);x("maxHighlightLength",1E4,eb,!0);x("moveInputWithCursor",!0,function(a,b){b||a.display.input.resetPosition()});x("tabindex",null,function(a,b){a.display.input.getField().tabIndex=b||""});x("autofocus",null);var pf=q.modes={},Hb=q.mimeModes={};q.defineMode=function(a,b){q.defaults.mode||"null"==a||(q.defaults.mode=a);2<arguments.length&&(b.dependencies=Array.prototype.slice.call(arguments,2));pf[a]=b};q.defineMIME=function(a,b){Hb[a]=b};q.resolveMode=
227function(a){if("string"==typeof a&&Hb.hasOwnProperty(a))a=Hb[a];else if(a&&"string"==typeof a.name&&Hb.hasOwnProperty(a.name)){var b=Hb[a.name];"string"==typeof b&&(b={name:b});a=ff(b,a);a.name=b.name}else if("string"==typeof a&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return q.resolveMode("application/xml");return"string"==typeof a?{name:a}:a||{name:"null"}};q.getMode=function(a,b){b=q.resolveMode(b);var c=pf[b.name];if(!c)return q.getMode(a,"text/plain");c=c(a,b);if(Ib.hasOwnProperty(b.name)){var d=Ib[b.name],
228e;for(e in d)d.hasOwnProperty(e)&&(c.hasOwnProperty(e)&&(c["_"+e]=c[e]),c[e]=d[e])}c.name=b.name;b.helperType&&(c.helperType=b.helperType);if(b.modeProps)for(e in b.modeProps)c[e]=b.modeProps[e];return c};q.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}});q.defineMIME("text/plain","null");var Ib=q.modeExtensions={};q.extendMode=function(a,b){var c=Ib.hasOwnProperty(a)?Ib[a]:Ib[a]={};V(b,c)};q.defineExtension=function(a,b){q.prototype[a]=b};q.defineDocExtension=function(a,b){P.prototype[a]=
229b};q.defineOption=x;var yc=[];q.defineInitHook=function(a){yc.push(a)};var $a=q.helpers={};q.registerHelper=function(a,b,c){$a.hasOwnProperty(a)||($a[a]=q[a]={_global:[]});$a[a][b]=c};q.registerGlobalHelper=function(a,b,c,d){q.registerHelper(a,b,d);$a[a]._global.push({pred:c,val:d})};var Sa=q.copyState=function(a,b){if(!0===b)return b;if(a.copyState)return a.copyState(b);var c={},d;for(d in b){var e=b[d];e instanceof Array&&(e=e.concat([]));c[d]=e}return c},Df=q.startState=function(a,b,c){return a.startState?
230a.startState(b,c):!0};q.innerMode=function(a,b){for(;a.innerMode;){var c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state;a=c.mode}return c||{mode:a,state:b}};var ic=q.commands={selectAll:function(a){a.setSelection(r(a.firstLine(),0),r(a.lastLine()),ha)},singleSelection:function(a){a.setSelection(a.getCursor("anchor"),a.getCursor("head"),ha)},killLine:function(a){Va(a,function(b){if(b.empty()){var c=u(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line<a.lastLine()?{from:b.head,to:r(b.head.line+
2311,0)}:{from:b.head,to:r(b.head.line,c)}}return{from:b.from(),to:b.to()}})},deleteLine:function(a){Va(a,function(b){return{from:r(b.from().line,0),to:w(a.doc,r(b.to().line+1,0))}})},delLineLeft:function(a){Va(a,function(a){return{from:r(a.from().line,0),to:a.from()}})},delWrappedLineLeft:function(a){Va(a,function(b){var c=a.charCoords(b.head,"div").top+5;return{from:a.coordsChar({left:0,top:c},"div"),to:b.from()}})},delWrappedLineRight:function(a){Va(a,function(b){var c=a.charCoords(b.head,"div").top+
2325,c=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div");return{from:b.from(),to:c}})},undo:function(a){a.undo()},redo:function(a){a.redo()},undoSelection:function(a){a.undoSelection()},redoSelection:function(a){a.redoSelection()},goDocStart:function(a){a.extendSelection(r(a.firstLine(),0))},goDocEnd:function(a){a.extendSelection(r(a.lastLine()))},goLineStart:function(a){a.extendSelectionsBy(function(b){return kf(a,b.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){a.extendSelectionsBy(function(b){return lf(a,
233b.head)},{origin:"+move",bias:1})},goLineEnd:function(a){a.extendSelectionsBy(function(b){b=b.head.line;for(var c,d=u(a.doc,b);c=Aa(d,!1);)d=c.find(1,!0).line,b=null;c=(c=Y(d))?c[0].level%2?ac(d):bc(d):d.text.length;return r(null==b?F(d):b,c)},{origin:"+move",bias:-1})},goLineRight:function(a){a.extendSelectionsBy(function(b){b=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:b},"div")},Gb)},goLineLeft:function(a){a.extendSelectionsBy(function(b){b=
234a.charCoords(b.head,"div").top+5;return a.coordsChar({left:0,top:b},"div")},Gb)},goLineLeftSmart:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5,c=a.coordsChar({left:0,top:c},"div");return c.ch<a.getLine(c.line).search(/\S/)?lf(a,b.head):c},Gb)},goLineUp:function(a){a.moveV(-1,"line")},goLineDown:function(a){a.moveV(1,"line")},goPageUp:function(a){a.moveV(-1,"page")},goPageDown:function(a){a.moveV(1,"page")},goCharLeft:function(a){a.moveH(-1,"char")},goCharRight:function(a){a.moveH(1,
235"char")},goColumnLeft:function(a){a.moveH(-1,"column")},goColumnRight:function(a){a.moveH(1,"column")},goWordLeft:function(a){a.moveH(-1,"word")},goGroupRight:function(a){a.moveH(1,"group")},goGroupLeft:function(a){a.moveH(-1,"group")},goWordRight:function(a){a.moveH(1,"word")},delCharBefore:function(a){a.deleteH(-1,"char")},delCharAfter:function(a){a.deleteH(1,"char")},delWordBefore:function(a){a.deleteH(-1,"word")},delWordAfter:function(a){a.deleteH(1,"word")},delGroupBefore:function(a){a.deleteH(-1,
236"group")},delGroupAfter:function(a){a.deleteH(1,"group")},indentAuto:function(a){a.indentSelection("smart")},indentMore:function(a){a.indentSelection("add")},indentLess:function(a){a.indentSelection("subtract")},insertTab:function(a){a.replaceSelection("\t")},insertSoftTab:function(a){for(var b=[],c=a.listSelections(),d=a.options.tabSize,e=0;e<c.length;e++){var f=c[e].from(),f=aa(a.getLine(f.line),f.ch,d);b.push(Array(d-f%d+1).join(" "))}a.replaceSelections(b)},defaultTab:function(a){a.somethingSelected()?
237a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){T(a,function(){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++){var e=b[d].head,f=u(a.doc,e.line).text;if(f)if(e.ch==f.length&&(e=new r(e.line,e.ch-1)),0<e.ch)e=new r(e.line,e.ch+1),a.replaceRange(f.charAt(e.ch-1)+f.charAt(e.ch-2),r(e.line,e.ch-2),e,"+transpose");else if(e.line>a.doc.first){var g=u(a.doc,e.line-1).text;g&&a.replaceRange(f.charAt(0)+"\n"+g.charAt(g.length-1),r(e.line-1,g.length-1),r(e.line,1),"+transpose")}c.push(new z(e,
238e))}a.setSelections(c)})},newlineAndIndent:function(a){T(a,function(){for(var b=a.listSelections().length,c=0;c<b;c++){var d=a.listSelections()[c];a.replaceRange("\n",d.anchor,d.head,"+input");a.indentLine(d.from().line+1,null,!0);Pa(a)}})},toggleOverwrite:function(a){a.toggleOverwrite()}},ua=q.keyMap={};ua.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore",
239"Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"};ua.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter",
240"Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"};ua.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp",
241"Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"};ua.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter",
242"Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]};ua["default"]=W?ua.macDefault:ua.pcDefault;q.normalizeKeyMap=function(a){var b={},c;for(c in a)if(a.hasOwnProperty(c)){var d=
243a[c];if(!/^(name|fallthrough|(de|at)tach)$/.test(c)){if("..."!=d)for(var e=ob(c.split(" "),Wf),f=0;f<e.length;f++){var g,h;f==e.length-1?(h=c,g=d):(h=e.slice(0,f+1).join(" "),g="...");var k=b[h];if(!k)b[h]=g;else if(k!=g)throw Error("Inconsistent bindings for "+h);}delete a[c]}}for(var l in b)a[l]=b[l];return a};var xb=q.lookupKey=function(a,b,c,d){b=pc(b);var e=b.call?b.call(a,d):b[a];if(!1===e)return"nothing";if("..."===e)return"multi";if(null!=e&&c(e))return"handled";if(b.fallthrough){if("[object Array]"!=
244Object.prototype.toString.call(b.fallthrough))return xb(a,b.fallthrough,c,d);for(e=0;e<b.fallthrough.length;e++){var f=xb(a,b.fallthrough[e],c,d);if(f)return f}}},Pf=q.isModifierKey=function(a){a="string"==typeof a?a:va[a.keyCode];return"Ctrl"==a||"Alt"==a||"Shift"==a||"Mod"==a},Rf=q.keyName=function(a,b){if(ba&&34==a.keyCode&&a["char"])return!1;var c=va[a.keyCode],d=c;if(null==d||a.altGraphKey)return!1;a.altKey&&"Alt"!=c&&(d="Alt-"+d);(of?a.metaKey:a.ctrlKey)&&"Ctrl"!=c&&(d="Ctrl-"+d);(of?a.ctrlKey:
245a.metaKey)&&"Cmd"!=c&&(d="Cmd-"+d);!b&&a.shiftKey&&"Shift"!=c&&(d="Shift-"+d);return d};q.fromTextArea=function(a,b){function c(){a.value=k.getValue()}b=b?V(b):{};b.value=a.value;!b.tabindex&&a.tabIndex&&(b.tabindex=a.tabIndex);!b.placeholder&&a.placeholder&&(b.placeholder=a.placeholder);if(null==b.autofocus){var d=fa();b.autofocus=d==a||null!=a.getAttribute("autofocus")&&d==document.body}if(a.form&&(v(a.form,"submit",c),!b.leaveSubmitMethodAlone)){var e=a.form,f=e.submit;try{var g=e.submit=function(){c();
246e.submit=f;e.submit();e.submit=g}}catch(h){}}b.finishInit=function(b){b.save=c;b.getTextArea=function(){return a};b.toTextArea=function(){b.toTextArea=isNaN;c();a.parentNode.removeChild(b.getWrapperElement());a.style.display="";a.form&&(ka(a.form,"submit",c),"function"==typeof a.form.submit&&(a.form.submit=f))}};a.style.display="none";var k=q(function(b){a.parentNode.insertBefore(b,a.nextSibling)},b);return k};var tc=q.StringStream=function(a,b){this.pos=this.start=0;this.string=a;this.tabSize=b||
2478;this.lineStart=this.lastColumnPos=this.lastColumnValue=0};tc.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(a){var b=this.string.charAt(this.pos);if("string"==typeof a?b==a:b&&(a.test?a.test(b):a(b)))return++this.pos,b},eatWhile:function(a){for(var b=this.pos;this.eat(a););return this.pos>
248b},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){a=this.string.indexOf(a,this.pos);if(-1<a)return this.pos=a,!0},backUp:function(a){this.pos-=a},column:function(){this.lastColumnPos<this.start&&(this.lastColumnValue=aa(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start);return this.lastColumnValue-(this.lineStart?
249aa(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return aa(this.string,null,this.tabSize)-(this.lineStart?aa(this.string,this.lineStart,this.tabSize):0)},match:function(a,b,c){if("string"==typeof a){var d=function(a){return c?a.toLowerCase():a},e=this.string.substr(this.pos,a.length);if(d(e)==d(a))return!1!==b&&(this.pos+=a.length),!0}else{if((a=this.string.slice(this.pos).match(a))&&0<a.index)return null;a&&!1!==b&&(this.pos+=a[0].length);return a}},current:function(){return this.string.slice(this.start,
250this.pos)},hideFirstChars:function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}}};var sd=0,Ha=q.TextMarker=function(a,b){this.lines=[];this.type=b;this.doc=a;this.id=++sd};Ya(Ha);Ha.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;b&&Ja(a);if(S(this,"clear")){var c=this.find();c&&L(this,"clear",c.from,c.to)}for(var d=c=null,e=0;e<this.lines.length;++e){var f=this.lines[e],g=zb(f.markedSpans,this);a&&!this.collapsed?na(a,F(f),"text"):a&&(null!=
251g.to&&(d=F(f)),null!=g.from&&(c=F(f)));for(var h=f,k=f.markedSpans,l=g,m=void 0,p=0;p<k.length;++p)k[p]!=l&&(m||(m=[])).push(k[p]);h.markedSpans=m;null==g.from&&this.collapsed&&!ya(this.doc,f)&&a&&ca(f,xa(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(e=0;e<this.lines.length;++e)f=ia(this.lines[e]),g=Kb(f),g>a.display.maxLineLength&&(a.display.maxLine=f,a.display.maxLineLength=g,a.display.maxLineChanged=!0);null!=c&&a&&this.collapsed&&Q(a,c,d+1);this.lines.length=0;this.explicitlyCleared=
252!0;this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&ge(a.doc));a&&L(a,"markerCleared",a,this);b&&La(a);this.parent&&this.parent.clear()}};Ha.prototype.find=function(a,b){null==a&&"bookmark"==this.type&&(a=1);for(var c,d,e=0;e<this.lines.length;++e){var f=this.lines[e],g=zb(f.markedSpans,this);if(null!=g.from&&(c=r(b?f:F(f),g.from),-1==a))return c;if(null!=g.to&&(d=r(b?f:F(f),g.to),1==a))return d}return c&&{from:c,to:d}};Ha.prototype.changed=function(){var a=this.find(-1,!0),b=this,c=this.doc.cm;
253a&&c&&T(c,function(){var d=a.line,e=F(a.line);if(e=Vc(c,e))le(e),c.curOp.selectionChanged=c.curOp.forceUpdate=!0;c.curOp.updateMaxLine=!0;ya(b.doc,d)||null==b.height||(e=b.height,b.height=null,(e=ub(b)-e)&&ca(d,d.height+e))})};Ha.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;b.maybeHiddenMarkers&&-1!=D(b.maybeHiddenMarkers,this)||(b.maybeUnhiddenMarkers||(b.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)};Ha.prototype.detachLine=function(a){this.lines.splice(D(this.lines,
254a),1);!this.lines.length&&this.doc.cm&&(a=this.doc.cm.curOp,(a.maybeHiddenMarkers||(a.maybeHiddenMarkers=[])).push(this))};var sd=0,rc=q.SharedTextMarker=function(a,b){this.markers=a;this.primary=b;for(var c=0;c<a.length;++c)a[c].parent=this};Ya(rc);rc.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();L(this,"clear")}};rc.prototype.find=function(a,b){return this.primary.find(a,b)};var sc=q.LineWidget=function(a,
255b,c){if(c)for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d]);this.doc=a;this.node=b};Ya(sc);sc.prototype.clear=function(){var a=this.doc.cm,b=this.line.widgets,c=this.line,d=F(c);if(null!=d&&b){for(var e=0;e<b.length;++e)b[e]==this&&b.splice(e--,1);b.length||(c.widgets=null);var f=ub(this);ca(c,Math.max(0,c.height-f));a&&T(a,function(){var b=-f;ea(c)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&lc(a,null,b);na(a,d,"widget")})}};sc.prototype.changed=function(){var a=this.height,b=this.doc.cm,c=this.line;
256this.height=null;var d=ub(this)-a;d&&(ca(c,c.height+d),b&&T(b,function(){b.curOp.forceUpdate=!0;ea(c)<(b.curOp&&b.curOp.scrollTop||b.doc.scrollTop)&&lc(b,null,d)}))};var Ab=q.Line=function(a,b,c){this.text=a;Ue(this,b);this.height=c?c(this):1};Ya(Ab);Ab.prototype.lineNo=function(){return F(this)};var bg={},ag={};Bb.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,b){for(var c=a,d=a+b;c<d;++c){var e=this.lines[c];this.height-=e.height;var f=e;f.parent=null;Te(f);L(e,
257"delete")}this.lines.splice(a,b)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,b,c){this.height+=c;this.lines=this.lines.slice(0,a).concat(b).concat(this.lines.slice(a));for(a=0;a<b.length;++a)b[a].parent=this},iterN:function(a,b,c){for(b=a+b;a<b;++a)if(c(this.lines[a]))return!0}};Cb.prototype={chunkSize:function(){return this.size},removeInner:function(a,b){this.size-=b;for(var c=0;c<this.children.length;++c){var d=this.children[c],e=d.chunkSize();if(a<e){var f=Math.min(b,
258e-a),g=d.height;d.removeInner(a,f);this.height-=g-d.height;e==f&&(this.children.splice(c--,1),d.parent=null);if(0==(b-=f))break;a=0}else a-=e}25>this.size-b&&(1<this.children.length||!(this.children[0]instanceof Bb))&&(c=[],this.collapse(c),this.children=[new Bb(c)],this.children[0].parent=this)},collapse:function(a){for(var b=0;b<this.children.length;++b)this.children[b].collapse(a)},insertInner:function(a,b,c){this.size+=b.length;this.height+=c;for(var d=0;d<this.children.length;++d){var e=this.children[d],
259f=e.chunkSize();if(a<=f){e.insertInner(a,b,c);if(e.lines&&50<e.lines.length){for(;50<e.lines.length;)a=e.lines.splice(e.lines.length-25,25),a=new Bb(a),e.height-=a.height,this.children.splice(d+1,0,a),a.parent=this;this.maybeSpill()}break}a-=f}},maybeSpill:function(){if(!(10>=this.children.length)){var a=this;do{var b=a.children.splice(a.children.length-5,5),b=new Cb(b);if(a.parent){a.size-=b.size;a.height-=b.height;var c=D(a.parent.children,a);a.parent.children.splice(c+1,0,b)}else c=new Cb(a.children),
260c.parent=a,a.children=[c,b],a=c;b.parent=a.parent}while(10<a.children.length);a.parent.maybeSpill()}},iterN:function(a,b,c){for(var d=0;d<this.children.length;++d){var e=this.children[d],f=e.chunkSize();if(a<f){f=Math.min(b,f-a);if(e.iterN(a,f,c))return!0;if(0==(b-=f))break;a=0}else a-=f}}};var og=0,P=q.Doc=function(a,b,c){if(!(this instanceof P))return new P(a,b,c);null==c&&(c=0);Cb.call(this,[new Bb([new Ab("",null)])]);this.first=c;this.scrollTop=this.scrollLeft=0;this.cantEdit=!1;this.cleanGeneration=
2611;this.frontier=c;c=r(c,0);this.sel=ga(c);this.history=new uc(null);this.id=++og;this.modeOption=b;"string"==typeof a&&(a=sa(a));qd(this,{from:c,to:c,text:a});H(this,ga(c),ha)};P.prototype=ff(Cb.prototype,{constructor:P,iter:function(a,b,c){c?this.iterN(a-this.first,b-a,c):this.iterN(this.first,this.first+this.size,a)},insert:function(a,b){for(var c=0,d=0;d<b.length;++d)c+=b[d].height;this.insertInner(a-this.first,b,c)},remove:function(a,b){this.removeInner(a-this.first,b)},getValue:function(a){var b=
262xd(this,this.first,this.first+this.size);return!1===a?b:b.join(a||"\n")},setValue:N(function(a){var b=r(this.first,0),c=this.first+this.size-1;Oa(this,{from:b,to:r(c,u(this,c).text.length),text:sa(a),origin:"setValue",full:!0},!0);H(this,ga(b))}),replaceRange:function(a,b,c,d){b=w(this,b);c=c?w(this,c):b;wb(this,a,b,c,d)},getRange:function(a,b,c){a=Da(this,w(this,a),w(this,b));return!1===c?a:a.join(c||"\n")},getLine:function(a){return(a=this.getLineHandle(a))&&a.text},getLineHandle:function(a){if(qb(this,
263a))return u(this,a)},getLineNumber:function(a){return F(a)},getLineHandleVisualStart:function(a){"number"==typeof a&&(a=u(this,a));return ia(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return w(this,a)},getCursor:function(a){var b=this.sel.primary();return null==a||"head"==a?b.head:"anchor"==a?b.anchor:"end"==a||"to"==a||!1===a?b.to():b.from()},listSelections:function(){return this.sel.ranges},
264somethingSelected:function(){return this.sel.somethingSelected()},setCursor:N(function(a,b,c){a=w(this,"number"==typeof a?r(a,b||0):a);H(this,ga(a,null),c)}),setSelection:N(function(a,b,c){var d=w(this,a);a=w(this,b||a);H(this,ga(d,a),c)}),extendSelection:N(function(a,b,c){Ub(this,w(this,a),b&&w(this,b),c)}),extendSelections:N(function(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=w(this,a[d]);ae(this,c)}),extendSelectionsBy:N(function(a,b){ae(this,ob(this.sel.ranges,a),b)}),setSelections:N(function(a,
265b,c){if(a.length){for(var d=0,e=[];d<a.length;d++)e[d]=new z(w(this,a[d].anchor),w(this,a[d].head));null==b&&(b=Math.min(a.length-1,this.sel.primIndex));H(this,Z(e,b),c)}}),addSelection:N(function(a,b,c){var d=this.sel.ranges.slice(0);d.push(new z(w(this,a),w(this,b||a)));H(this,Z(d,d.length-1),c)}),getSelection:function(a){for(var b=this.sel.ranges,c,d=0;d<b.length;d++){var e=Da(this,b[d].from(),b[d].to());c=c?c.concat(e):e}return!1===a?c:c.join(a||"\n")},getSelections:function(a){for(var b=[],c=
266this.sel.ranges,d=0;d<c.length;d++){var e=Da(this,c[d].from(),c[d].to());!1!==a&&(e=e.join(a||"\n"));b[d]=e}return b},replaceSelection:function(a,b,c){for(var d=[],e=0;e<this.sel.ranges.length;e++)d[e]=a;this.replaceSelections(d,b,c||"+input")},replaceSelections:N(function(a,b,c){for(var d=[],e=this.sel,f=0;f<e.ranges.length;f++){var g=e.ranges[f];d[f]={from:g.from(),to:g.to(),text:sa(a[f]),origin:c}}if(f=b&&"end"!=b){f=[];c=a=r(this.first,0);for(e=0;e<d.length;e++){var h=d[e],g=Ee(h.from,a,c),k=
267Ee(ta(h),a,c);a=h.to;c=k;"around"==b?(h=this.sel.ranges[e],h=0>y(h.head,h.anchor),f[e]=new z(h?k:g,h?g:k)):f[e]=new z(g,g)}f=new la(f,this.sel.primIndex)}b=f;for(f=d.length-1;0<=f;f--)Oa(this,d[f]);b?be(this,b):this.cm&&Pa(this.cm)}),undo:N(function(){kc(this,"undo")}),redo:N(function(){kc(this,"redo")}),undoSelection:N(function(){kc(this,"undo",!0)}),redoSelection:N(function(){kc(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=
268this.history,b=0,c=0,d=0;d<a.done.length;d++)a.done[d].ranges||++b;for(d=0;d<a.undone.length;d++)a.undone[d].ranges||++c;return{undo:b,redo:c}},clearHistory:function(){this.history=new uc(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null);return this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},
269getHistory:function(){return{done:Xa(this.history.done),undone:Xa(this.history.undone)}},setHistory:function(a){var b=this.history=new uc(this.history.maxGeneration);b.done=Xa(a.done.slice(0),null,!0);b.undone=Xa(a.undone.slice(0),null,!0)},addLineClass:N(function(a,b,c){return nc(this,a,"gutter"==b?"gutter":"class",function(a){var e="text"==b?"textClass":"background"==b?"bgClass":"gutter"==b?"gutterClass":"wrapClass";if(a[e]){if(Fb(c).test(a[e]))return!1;a[e]+=" "+c}else a[e]=c;return!0})}),removeLineClass:N(function(a,
270b,c){return nc(this,a,"gutter"==b?"gutter":"class",function(a){var e="text"==b?"textClass":"background"==b?"bgClass":"gutter"==b?"gutterClass":"wrapClass",f=a[e];if(f)if(null==c)a[e]=null;else{var g=f.match(Fb(c));if(!g)return!1;var h=g.index+g[0].length;a[e]=f.slice(0,g.index)+(g.index&&h!=f.length?" ":"")+f.slice(h)||null}else return!1;return!0})}),addLineWidget:N(function(a,b,c){return $f(this,a,b,c)}),removeLineWidget:function(a){a.clear()},markText:function(a,b,c){return Wa(this,w(this,a),w(this,
271b),c,"range")},setBookmark:function(a,b){var c={replacedWith:b&&(null==b.nodeType?b.widget:b),insertLeft:b&&b.insertLeft,clearWhenEmpty:!1,shared:b&&b.shared,handleMouseEvents:b&&b.handleMouseEvents};a=w(this,a);return Wa(this,a,a,c,"bookmark")},findMarksAt:function(a){a=w(this,a);var b=[],c=u(this,a.line).markedSpans;if(c)for(var d=0;d<c.length;++d){var e=c[d];(null==e.from||e.from<=a.ch)&&(null==e.to||e.to>=a.ch)&&b.push(e.marker.parent||e.marker)}return b},findMarks:function(a,b,c){a=w(this,a);
272b=w(this,b);var d=[],e=a.line;this.iter(a.line,b.line+1,function(f){if(f=f.markedSpans)for(var g=0;g<f.length;g++){var h=f[g];e==a.line&&a.ch>h.to||null==h.from&&e!=a.line||e==b.line&&h.from>b.ch||c&&!c(h.marker)||d.push(h.marker.parent||h.marker)}++e});return d},getAllMarks:function(){var a=[];this.iter(function(b){if(b=b.markedSpans)for(var c=0;c<b.length;++c)null!=b[c].from&&a.push(b[c].marker)});return a},posFromIndex:function(a){var b,c=this.first;this.iter(function(d){d=d.text.length+1;if(d>
273a)return b=a,!0;a-=d;++c});return w(this,r(c,b))},indexFromPos:function(a){a=w(this,a);var b=a.ch;if(a.line<this.first||0>a.ch)return 0;this.iter(this.first,a.line,function(a){b+=a.text.length+1});return b},copy:function(a){var b=new P(xd(this,this.first,this.first+this.size),this.modeOption,this.first);b.scrollTop=this.scrollTop;b.scrollLeft=this.scrollLeft;b.sel=this.sel;b.extend=!1;a&&(b.history.undoDepth=this.history.undoDepth,b.setHistory(this.getHistory()));return b},linkedDoc:function(a){a||
274(a={});var b=this.first,c=this.first+this.size;null!=a.from&&a.from>b&&(b=a.from);null!=a.to&&a.to<c&&(c=a.to);b=new P(xd(this,b,c),a.mode||this.modeOption,b);a.sharedHist&&(b.history=this.history);(this.linked||(this.linked=[])).push({doc:b,sharedHist:a.sharedHist});b.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}];a=Re(this);for(c=0;c<a.length;c++){var d=a[c],e=d.find(),f=b.clipPos(e.from),e=b.clipPos(e.to);y(f,e)&&(f=Wa(b,f,e,d.primary,d.primary.type),d.markers.push(f),f.parent=d)}return b},
275unlinkDoc:function(a){a instanceof q&&(a=a.doc);if(this.linked)for(var b=0;b<this.linked.length;++b)if(this.linked[b].doc==a){this.linked.splice(b,1);a.unlinkDoc(this);Yf(Re(this));break}if(a.history==this.history){var c=[a.id];Ga(a,function(a){c.push(a.id)},!0);a.history=new uc(null);a.history.done=Xa(this.history.done,c);a.history.undone=Xa(this.history.undone,c)}},iterLinkedDocs:function(a){Ga(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm}});P.prototype.eachLine=
276P.prototype.iter;var pg=["iter","insert","remove","copy","getEditor"],Jb;for(Jb in P.prototype)P.prototype.hasOwnProperty(Jb)&&0>D(pg,Jb)&&(q.prototype[Jb]=function(a){return function(){return a.apply(this.doc,arguments)}}(P.prototype[Jb]));Ya(P);var O=q.e_preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},qg=q.e_stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},jd=q.e_stop=function(a){O(a);qg(a)},v=q.on=function(a,b,c){a.addEventListener?
277a.addEventListener(b,c,!1):a.attachEvent?a.attachEvent("on"+b,c):(a=a._handlers||(a._handlers={}),(a[b]||(a[b]=[])).push(c))},ka=q.off=function(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else if(a.detachEvent)a.detachEvent("on"+b,c);else if(a=a._handlers&&a._handlers[b])for(b=0;b<a.length;++b)if(a[b]==c){a.splice(b,1);break}},K=q.signal=function(a,b){var c=a._handlers&&a._handlers[b];if(c)for(var d=Array.prototype.slice.call(arguments,2),e=0;e<c.length;++e)c[e].apply(null,d)},Db=
278null,Hd=30,Ae=q.Pass={toString:function(){return"CodeMirror.Pass"}},ha={scroll:!1},kd={origin:"*mouse"},Gb={origin:"+move"};bb.prototype.set=function(a,b){clearTimeout(this.id);this.id=setTimeout(b,a)};var aa=q.countColumn=function(a,b,c,d,e){null==b&&(b=a.search(/[^\s\u00a0]/),-1==b&&(b=a.length));d=d||0;for(e=e||0;;){var f=a.indexOf("\t",d);if(0>f||f>=b)return e+(b-d);e+=f-d;e+=c-e%c;d=f+1}},vc=[""],Za=function(a){a.select()};Qa?Za=function(a){a.selectionStart=0;a.selectionEnd=a.value.length}:B&&
279(Za=function(a){try{a.select()}catch(b){}});var rg=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,gf=q.isWordChar=function(a){return/\w/.test(a)||"€"<a&&(a.toUpperCase()!=a.toLowerCase()||rg.test(a))},ig=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,
280Ea;Ea=document.createRange?function(a,b,c,d){var e=document.createRange();e.setEnd(d||a,c);e.setStart(a,b);return e}:function(a,b,c){var d=document.body.createTextRange();try{d.moveToElementText(a.parentNode)}catch(e){return d}d.collapse(!0);d.moveEnd("character",c);d.moveStart("character",b);return d};var Wc=q.contains=function(a,b){3==b.nodeType&&(b=b.parentNode);if(a.contains)return a.contains(b);do if(11==b.nodeType&&(b=b.host),b==a)return!0;while(b=b.parentNode)};B&&11>C&&(fa=function(){try{return document.activeElement}catch(a){return document.body}});
281var kb=q.rmClass=function(a,b){var c=a.className,d=Fb(b).exec(c);if(d){var e=c.slice(d.index+d[0].length);a.className=c.slice(0,d.index)+(e?d[1]+e:"")}},mb=q.addClass=function(a,b){var c=a.className;Fb(b).test(c)||(a.className+=(c?" ":"")+b)},Dd=!1,Lf=function(){if(B&&9>C)return!1;var a=t("div");return"draggable"in a||"dragDrop"in a}(),yd,vd,sa=q.splitLines=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;b<=d;){var e=a.indexOf("\n",b);-1==e&&(e=a.length);var f=a.slice(b,"\r"==
282a.charAt(e-1)?e-1:e),g=f.indexOf("\r");-1!=g?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)},ng=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return b&&b.parentElement()==a?0!=b.compareEndPoints("StartToEnd",b):!1},Ce=function(){var a=t("div");if("oncopy"in a)return!0;a.setAttribute("oncopy","return;");return"function"==typeof a.oncopy}(),
283bd=null,va={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"\x3d",91:"Mod",92:"Mod",93:"Mod",107:"\x3d",109:"-",127:"Delete",173:"-",186:";",187:"\x3d",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",
28463275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};q.keyNames=va;(function(){for(var a=0;10>a;a++)va[a+48]=va[a+96]=String(a);for(a=65;90>=a;a++)va[a]=String.fromCharCode(a);for(a=1;12>=a;a++)va[a+111]=va[a+63235]="F"+a})();var vb,gg=function(){function a(a){return 247>=a?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(a):
2851424<=a&&1524>=a?"R":1536<=a&&1773>=a?"rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm".charAt(a-1536):1774<=a&&2220>=a?"r":8192<=a&&8203>=a?"w":8204==a?"b":"L"}function b(a,b,c){this.level=a;this.from=b;this.to=c}var c=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,d=/[stwN]/,e=/[LRr]/,f=/[Lb1n]/,g=/[1n]/;return function(h){if(!c.test(h))return!1;
286for(var k=h.length,l=[],m=0,p;m<k;++m)l.push(a(h.charCodeAt(m)));for(var m=0,n="L";m<k;++m)p=l[m],"m"==p?l[m]=n:n=p;m=0;for(n="L";m<k;++m)p=l[m],"1"==p&&"r"==n?l[m]="n":e.test(p)&&(n=p,"r"==p&&(l[m]="R"));m=1;for(n=l[0];m<k-1;++m)p=l[m],"+"==p&&"1"==n&&"1"==l[m+1]?l[m]="1":","!=p||n!=l[m+1]||"1"!=n&&"n"!=n||(l[m]=n),n=p;for(m=0;m<k;++m)if(p=l[m],","==p)l[m]="N";else if("%"==p){for(n=m+1;n<k&&"%"==l[n];++n);var q=m&&"!"==l[m-1]||n<k&&"1"==l[n]?"1":"N";for(p=m;p<n;++p)l[p]=q;m=n-1}m=0;for(n="L";m<k;++m)p=
287l[m],"L"==n&&"1"==p?l[m]="L":e.test(p)&&(n=p);for(m=0;m<k;++m)if(d.test(l[m])){for(n=m+1;n<k&&d.test(l[n]);++n);p="L"==(n<k?l[n]:"L");q="L"==(m?l[m-1]:"L")||p?"L":"R";for(p=m;p<n;++p)l[p]=q;m=n-1}for(var n=[],r,m=0;m<k;)if(f.test(l[m])){p=m;for(++m;m<k&&f.test(l[m]);++m);n.push(new b(0,p,m))}else{var t=m,q=n.length;for(++m;m<k&&"L"!=l[m];++m);for(p=t;p<m;)if(g.test(l[p])){t<p&&n.splice(q,0,new b(1,t,p));t=p;for(++p;p<m&&g.test(l[p]);++p);n.splice(q,0,new b(2,t,p));t=p}else++p;t<m&&n.splice(q,0,new b(1,
288t,m))}1==n[0].level&&(r=h.match(/^\s+/))&&(n[0].from=r[0].length,n.unshift(new b(0,0,r[0].length)));1==A(n).level&&(r=h.match(/\s+$/))&&(A(n).to-=r[0].length,n.push(new b(0,k-r[0].length,k)));2==n[0].level&&n.unshift(new b(1,n[0].to,n[0].to));n[0].level!=A(n).level&&n.push(new b(n[0].level,k,k));return n}}();q.version="5.2.0";return q}); \ No newline at end of file
diff --git a/release/samples/toolbarconfigurator/lib/codemirror/javascript.js b/release/samples/toolbarconfigurator/lib/codemirror/javascript.js
new file mode 100644
index 0000000..c76ab46
--- /dev/null
+++ b/release/samples/toolbarconfigurator/lib/codemirror/javascript.js
@@ -0,0 +1,25 @@
1(function(p){"object"==typeof exports&&"object"==typeof module?p(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],p):p(CodeMirror)})(function(p){p.defineMode("javascript",function(oa,t){function q(a,c,e){E=a;I=e;return c}function w(a,c){var e=a.next();if('"'==e||"'"==e)return c.tokenize=pa(e),c.tokenize(a,c);if("."==e&&a.match(/^\d+(?:[eE][+\-]?\d+)?/))return q("number","number");if("."==e&&a.match(".."))return q("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(e))return q(e);
2if("\x3d"==e&&a.eat("\x3e"))return q("\x3d\x3e","operator");if("0"==e&&a.eat(/x/i))return a.eatWhile(/[\da-f]/i),q("number","number");if(/\d/.test(e))return a.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),q("number","number");if("/"==e){if(a.eat("*"))return c.tokenize=J,J(a,c);if(a.eat("/"))return a.skipToEnd(),q("comment","comment");if("operator"==c.lastType||"keyword c"==c.lastType||"sof"==c.lastType||/^[\[{}\(,;:]$/.test(c.lastType)){a:for(var e=!1,d,b=!1;null!=(d=a.next());){if(!e){if("/"==d&&!b)break a;
3"["==d?b=!0:b&&"]"==d&&(b=!1)}e=!e&&"\\"==d}a.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return q("regexp","string-2")}a.eatWhile(K);return q("operator","operator",a.current())}if("`"==e)return c.tokenize=Q,Q(a,c);if("#"==e)return a.skipToEnd(),q("error","error");if(K.test(e))return a.eatWhile(K),q("operator","operator",a.current());if(R.test(e))return a.eatWhile(R),e=a.current(),(d=ba.propertyIsEnumerable(e)&&ba[e])&&"."!=c.lastType?q(d.type,d.style,e):q("variable","variable",e)}function pa(a){return function(c,
4e){var d=!1,b;if(L&&"@"==c.peek()&&c.match(qa))return e.tokenize=w,q("jsonld-keyword","meta");for(;null!=(b=c.next())&&(b!=a||d);)d=!d&&"\\"==b;d||(e.tokenize=w);return q("string","string")}}function J(a,c){for(var e=!1,d;d=a.next();){if("/"==d&&e){c.tokenize=w;break}e="*"==d}return q("comment","comment")}function Q(a,c){for(var e=!1,d;null!=(d=a.next());){if(!e&&("`"==d||"$"==d&&a.eat("{"))){c.tokenize=w;break}e=!e&&"\\"==d}return q("quasi","string-2",a.current())}function S(a,c){c.fatArrowAt&&(c.fatArrowAt=
5null);var e=a.string.indexOf("\x3d\x3e",a.start);if(!(0>e)){for(var d=0,b=!1,e=e-1;0<=e;--e){var f=a.string.charAt(e),g="([{}])".indexOf(f);if(0<=g&&3>g){if(!d){++e;break}if(0==--d)break}else if(3<=g&&6>g)++d;else if(R.test(f))b=!0;else{if(/["'\/]/.test(f))return;if(b&&!d){++e;break}}}b&&!d&&(c.fatArrowAt=e)}}function ca(a,c,b,d,f,h){this.indented=a;this.column=c;this.type=b;this.prev=f;this.info=h;null!=d&&(this.align=d)}function g(){for(var a=arguments.length-1;0<=a;a--)f.cc.push(arguments[a])}
6function b(){g.apply(null,arguments);return!0}function x(a){function c(c){for(;c;c=c.next)if(c.name==a)return!0;return!1}var b=f.state;b.context?(f.marked="def",c(b.localVars)||(b.localVars={name:a,next:b.localVars})):!c(b.globalVars)&&t.globalVars&&(b.globalVars={name:a,next:b.globalVars})}function y(){f.state.context={prev:f.state.context,vars:f.state.localVars};f.state.localVars=ra}function z(){f.state.localVars=f.state.context.vars;f.state.context=f.state.context.prev}function l(a,c){var b=function(){var b=
7f.state,e=b.indented;if("stat"==b.lexical.type)e=b.lexical.indented;else for(var h=b.lexical;h&&")"==h.type&&h.align;h=h.prev)e=h.indented;b.lexical=new ca(e,f.stream.column(),a,null,b.lexical,c)};b.lex=!0;return b}function k(){var a=f.state;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function m(a){function c(e){return e==a?b():";"==a?g():b(c)}return c}function r(a,c){return"var"==a?b(l("vardef",c.length),T,m(";"),k):"keyword a"==a?b(l("form"),n,
8r,k):"keyword b"==a?b(l("form"),r,k):"{"==a?b(l("}"),U,k):";"==a?b():"if"==a?("else"==f.state.lexical.info&&f.state.cc[f.state.cc.length-1]==k&&f.state.cc.pop()(),b(l("form"),n,r,k,da)):"function"==a?b(v):"for"==a?b(l("form"),ea,r,k):"variable"==a?b(l("stat"),sa):"switch"==a?b(l("form"),n,l("}","switch"),m("{"),U,k,k):"case"==a?b(n,m(":")):"default"==a?b(m(":")):"catch"==a?b(l("form"),y,m("("),V,m(")"),r,k,z):"module"==a?b(l("form"),y,ta,z,k):"class"==a?b(l("form"),ua,k):"export"==a?b(l("form"),va,
9k):"import"==a?b(l("form"),wa,k):g(l("stat"),n,m(";"),k)}function n(a){return fa(a,!1)}function u(a){return fa(a,!0)}function fa(a,c){if(f.state.fatArrowAt==f.stream.start){var e=c?ga:ha;if("("==a)return b(y,l(")"),F(A,")"),k,m("\x3d\x3e"),e,z);if("variable"==a)return g(y,A,m("\x3d\x3e"),e,z)}e=c?W:M;return xa.hasOwnProperty(a)?b(e):"function"==a?b(v,e):"keyword c"==a?b(c?ia:X):"("==a?b(l(")"),X,N,m(")"),k,e):"operator"==a||"spread"==a?b(c?u:n):"["==a?b(l("]"),ya,k,e):"{"==a?G(za,"}",null,e):"quasi"==
10a?g(O,e):b()}function X(a){return a.match(/[;\}\)\],]/)?g():g(n)}function ia(a){return a.match(/[;\}\)\],]/)?g():g(u)}function M(a,c){return","==a?b(n):W(a,c,!1)}function W(a,c,e){var d=0==e?M:W,f=0==e?n:u;if("\x3d\x3e"==a)return b(y,e?ga:ha,z);if("operator"==a)return/\+\+|--/.test(c)?b(d):"?"==c?b(n,m(":"),f):b(f);if("quasi"==a)return g(O,d);if(";"!=a){if("("==a)return G(u,")","call",d);if("."==a)return b(Aa,d);if("["==a)return b(l("]"),X,m("]"),k,d)}}function O(a,c){return"quasi"!=a?g():"${"!=c.slice(c.length-
112)?b(O):b(n,Ba)}function Ba(a){if("}"==a)return f.marked="string-2",f.state.tokenize=Q,b(O)}function ha(a){S(f.stream,f.state);return g("{"==a?r:n)}function ga(a){S(f.stream,f.state);return g("{"==a?r:u)}function sa(a){return":"==a?b(k,r):g(M,m(";"),k)}function Aa(a){if("variable"==a)return f.marked="property",b()}function za(a,c){if("variable"==a||"keyword"==f.style)return f.marked="property","get"==c||"set"==c?b(Ca):b(H);if("number"==a||"string"==a)return f.marked=L?"property":f.style+" property",
12b(H);if("jsonld-keyword"==a)return b(H);if("["==a)return b(n,m("]"),H)}function Ca(a){if("variable"!=a)return g(H);f.marked="property";return b(v)}function H(a){if(":"==a)return b(u);if("("==a)return g(v)}function F(a,c){function e(d){return","==d?(d=f.state.lexical,"call"==d.info&&(d.pos=(d.pos||0)+1),b(a,e)):d==c?b():b(m(c))}return function(d){return d==c?b():g(a,e)}}function G(a,c,e){for(var d=3;d<arguments.length;d++)f.cc.push(arguments[d]);return b(l(c,e),F(a,c),k)}function U(a){return"}"==a?
13b():g(r,U)}function ja(a){if(ka&&":"==a)return b(Da)}function Da(a){if("variable"==a)return f.marked="variable-3",b()}function T(){return g(A,ja,Y,Ea)}function A(a,c){if("variable"==a)return x(c),b();if("["==a)return G(A,"]");if("{"==a)return G(Fa,"}")}function Fa(a,c){if("variable"==a&&!f.stream.match(/^\s*:/,!1))return x(c),b(Y);"variable"==a&&(f.marked="property");return b(m(":"),A,Y)}function Y(a,c){if("\x3d"==c)return b(u)}function Ea(a){if(","==a)return b(T)}function da(a,c){if("keyword b"==
14a&&"else"==c)return b(l("form","else"),r,k)}function ea(a){if("("==a)return b(l(")"),Ga,m(")"),k)}function Ga(a){return"var"==a?b(T,m(";"),P):";"==a?b(P):"variable"==a?b(Ha):g(n,m(";"),P)}function Ha(a,c){return"in"==c||"of"==c?(f.marked="keyword",b(n)):b(M,P)}function P(a,c){return";"==a?b(la):"in"==c||"of"==c?(f.marked="keyword",b(n)):g(n,m(";"),la)}function la(a){")"!=a&&b(n)}function v(a,c){if("*"==c)return f.marked="keyword",b(v);if("variable"==a)return x(c),b(v);if("("==a)return b(y,l(")"),
15F(V,")"),k,r,z)}function V(a){return"spread"==a?b(V):g(A,ja)}function ua(a,c){if("variable"==a)return x(c),b(ma)}function ma(a,c){if("extends"==c)return b(n,ma);if("{"==a)return b(l("}"),B,k)}function B(a,c){if("variable"==a||"keyword"==f.style){if("static"==c)return f.marked="keyword",b(B);f.marked="property";return"get"==c||"set"==c?b(Ia,v,B):b(v,B)}if("*"==c)return f.marked="keyword",b(B);if(";"==a)return b(B);if("}"==a)return b()}function Ia(a){if("variable"!=a)return g();f.marked="property";
16return b()}function ta(a,c){if("string"==a)return b(r);if("variable"==a)return x(c),b(Z)}function va(a,c){return"*"==c?(f.marked="keyword",b(Z,m(";"))):"default"==c?(f.marked="keyword",b(n,m(";"))):g(r)}function wa(a){return"string"==a?b():g(aa,Z)}function aa(a,c){if("{"==a)return G(aa,"}");"variable"==a&&x(c);"*"==c&&(f.marked="keyword");return b(Ja)}function Ja(a,c){if("as"==c)return f.marked="keyword",b(aa)}function Z(a,c){if("from"==c)return f.marked="keyword",b(n)}function ya(a){return"]"==a?
17b():g(u,Ka)}function Ka(a){return"for"==a?g(N,m("]")):","==a?b(F(ia,"]")):g(F(u,"]"))}function N(a){if("for"==a)return b(ea,N);if("if"==a)return b(n,N)}var C=oa.indentUnit,na=t.statementIndent,L=t.jsonld,D=t.json||L,ka=t.typescript,R=t.wordCharacters||/[\w$\xa1-\uffff]/,ba=function(){function a(a){return{type:a,style:"keyword"}}var c=a("keyword a"),b=a("keyword b"),d=a("keyword c"),f=a("operator"),h={type:"atom",style:"atom"},c={"if":a("if"),"while":c,"with":c,"else":b,"do":b,"try":b,"finally":b,
18"return":d,"break":d,"continue":d,"new":d,"delete":d,"throw":d,"debugger":d,"var":a("var"),"const":a("var"),let:a("var"),"function":a("function"),"catch":a("catch"),"for":a("for"),"switch":a("switch"),"case":a("case"),"default":a("default"),"in":f,"typeof":f,"instanceof":f,"true":h,"false":h,"null":h,undefined:h,NaN:h,Infinity:h,"this":a("this"),module:a("module"),"class":a("class"),"super":a("atom"),yield:d,"export":a("export"),"import":a("import"),"extends":d};if(ka){var b={type:"variable",style:"variable-3"},
19b={"interface":a("interface"),"extends":a("extends"),constructor:a("constructor"),"public":a("public"),"private":a("private"),"protected":a("protected"),"static":a("static"),string:b,number:b,bool:b,any:b},g;for(g in b)c[g]=b[g]}return c}(),K=/[+\-*&%=<>!?|~^]/,qa=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,E,I,xa={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},f={state:null,column:null,marked:null,cc:null},ra={name:"this",
20next:{name:"arguments"}};k.lex=!0;return{startState:function(a){a={tokenize:w,lastType:"sof",cc:[],lexical:new ca((a||0)-C,0,"block",!1),localVars:t.localVars,context:t.localVars&&{vars:t.localVars},indented:0};t.globalVars&&"object"==typeof t.globalVars&&(a.globalVars=t.globalVars);return a},token:function(a,b){a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation(),S(a,b));if(b.tokenize!=J&&a.eatSpace())return null;var e=b.tokenize(a,b);if("comment"==E)return e;
21b.lastType="operator"!=E||"++"!=I&&"--"!=I?E:"incdec";a:{var d=E,g=I,h=b.cc;f.state=b;f.stream=a;f.marked=null;f.cc=h;f.style=e;b.lexical.hasOwnProperty("align")||(b.lexical.align=!0);for(;;)if((h.length?h.pop():D?n:r)(d,g)){for(;h.length&&h[h.length-1].lex;)h.pop()();if(f.marked){e=f.marked;break a}if(d="variable"==d)b:{for(d=b.localVars;d;d=d.next)if(d.name==g){d=!0;break b}for(h=b.context;h;h=h.prev)for(d=h.vars;d;d=d.next)if(d.name==g){d=!0;break b}d=void 0}if(d){e="variable-2";break a}break a}}return e},
22indent:function(a,b){if(a.tokenize==J)return p.Pass;if(a.tokenize!=w)return 0;var e=b&&b.charAt(0),d=a.lexical;if(!/^\s*else\b/.test(b))for(var f=a.cc.length-1;0<=f;--f){var g=a.cc[f];if(g==k)d=d.prev;else if(g!=da)break}"stat"==d.type&&"}"==e&&(d=d.prev);na&&")"==d.type&&"stat"==d.prev.type&&(d=d.prev);f=d.type;g=e==f;return"vardef"==f?d.indented+("operator"==a.lastType||","==a.lastType?d.info+1:0):"form"==f&&"{"==e?d.indented:"form"==f?d.indented+C:"stat"==f?(e=d.indented,d="operator"==a.lastType||
23","==a.lastType||K.test(b.charAt(0))||/[,.]/.test(b.charAt(0)),e+(d?na||C:0)):"switch"!=d.info||g||0==t.doubleIndentSwitch?d.align?d.column+(g?0:1):d.indented+(g?0:C):d.indented+(/^(?:case|default)\b/.test(b)?C:2*C)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:D?null:"/*",blockCommentEnd:D?null:"*/",lineComment:D?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:D?"json":"javascript",jsonldMode:L,jsonMode:D}});p.registerHelper("wordChars","javascript",/[\w$]/);
24p.defineMIME("text/javascript","javascript");p.defineMIME("text/ecmascript","javascript");p.defineMIME("application/javascript","javascript");p.defineMIME("application/x-javascript","javascript");p.defineMIME("application/ecmascript","javascript");p.defineMIME("application/json",{name:"javascript",json:!0});p.defineMIME("application/x-json",{name:"javascript",json:!0});p.defineMIME("application/ld+json",{name:"javascript",jsonld:!0});p.defineMIME("text/typescript",{name:"javascript",typescript:!0});
25p.defineMIME("application/typescript",{name:"javascript",typescript:!0})}); \ No newline at end of file
diff --git a/release/samples/toolbarconfigurator/lib/codemirror/neo.css b/release/samples/toolbarconfigurator/lib/codemirror/neo.css
new file mode 100644
index 0000000..f932db0
--- /dev/null
+++ b/release/samples/toolbarconfigurator/lib/codemirror/neo.css
@@ -0,0 +1,36 @@
1/* neo theme for codemirror */
2
3/* Color scheme */
4
5.cm-s-neo.CodeMirror {
6 background-color:#ffffff;
7 color:#2e383c;
8 line-height:1.4375;
9}
10.cm-s-neo .cm-comment {color:#75787b}
11.cm-s-neo .cm-keyword, .cm-s-neo .cm-property {color:#1d75b3}
12.cm-s-neo .cm-atom,.cm-s-neo .cm-number {color:#75438a}
13.cm-s-neo .cm-node,.cm-s-neo .cm-tag {color:#9c3328}
14.cm-s-neo .cm-string {color:#b35e14}
15.cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier {color:#047d65}
16
17
18/* Editor styling */
19
20.cm-s-neo pre {
21 padding:0;
22}
23
24.cm-s-neo .CodeMirror-gutters {
25 border:none;
26 border-right:10px solid transparent;
27 background-color:transparent;
28}
29
30.cm-s-neo .CodeMirror-linenumber {
31 padding:0;
32 color:#e0e2e5;
33}
34
35.cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; }
36.cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; }
diff --git a/release/samples/toolbarconfigurator/lib/codemirror/show-hint.css b/release/samples/toolbarconfigurator/lib/codemirror/show-hint.css
new file mode 100644
index 0000000..e38bfb6
--- /dev/null
+++ b/release/samples/toolbarconfigurator/lib/codemirror/show-hint.css
@@ -0,0 +1,38 @@
1.CodeMirror-hints {
2 position: absolute;
3 z-index: 10;
4 overflow: hidden;
5 list-style: none;
6
7 margin: 0;
8 padding: 2px;
9
10 -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
11 -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);
12 box-shadow: 2px 3px 5px rgba(0,0,0,.2);
13 border-radius: 3px;
14 border: 1px solid silver;
15
16 background: white;
17 font-size: 90%;
18 font-family: monospace;
19
20 max-height: 20em;
21 overflow-y: auto;
22}
23
24.CodeMirror-hint {
25 margin: 0;
26 padding: 0 4px;
27 border-radius: 2px;
28 max-width: 19em;
29 overflow: hidden;
30 white-space: pre;
31 color: black;
32 cursor: pointer;
33}
34
35li.CodeMirror-hint-active {
36 background: #08f;
37 color: white;
38}
diff --git a/release/samples/toolbarconfigurator/lib/codemirror/show-hint.js b/release/samples/toolbarconfigurator/lib/codemirror/show-hint.js
new file mode 100644
index 0000000..072359c
--- /dev/null
+++ b/release/samples/toolbarconfigurator/lib/codemirror/show-hint.js
@@ -0,0 +1,16 @@
1(function(f){"object"==typeof exports&&"object"==typeof module?f(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],f):f(CodeMirror)})(function(f){function p(a,b){this.cm=a;this.options=this.buildOptions(b);this.widget=null;this.tick=this.debounce=0;this.startPos=this.cm.getCursor();this.startLen=this.cm.getLine(this.startPos.line).length;var c=this;a.on("cursorActivity",this.activityFunc=function(){c.cursorActivity()})}function w(a,b){function c(a,
2c){var d;d="string"!=typeof c?function(a){return c(a,b)}:e.hasOwnProperty(c)?e[c]:c;f[a]=d}var e={Up:function(){b.moveFocus(-1)},Down:function(){b.moveFocus(1)},PageUp:function(){b.moveFocus(-b.menuSize()+1,!0)},PageDown:function(){b.moveFocus(b.menuSize()-1,!0)},Home:function(){b.setFocus(0)},End:function(){b.setFocus(b.length-1)},Enter:b.pick,Tab:b.pick,Esc:b.close},d=a.options.customKeys,f=d?{}:e;if(d)for(var g in d)d.hasOwnProperty(g)&&c(g,d[g]);if(d=a.options.extraKeys)for(g in d)d.hasOwnProperty(g)&&
3c(g,d[g]);return f}function v(a,b){for(;b&&b!=a;){if("LI"===b.nodeName.toUpperCase()&&b.parentNode==a)return b;b=b.parentNode}}function n(a,b){this.completion=a;this.data=b;this.picked=!1;var c=this,e=a.cm,d=this.hints=document.createElement("ul");d.className="CodeMirror-hints";this.selectedHint=b.selectedHint||0;for(var m=b.list,g=0;g<m.length;++g){var l=d.appendChild(document.createElement("li")),h=m[g],k="CodeMirror-hint"+(g!=this.selectedHint?"":" CodeMirror-hint-active");null!=h.className&&(k=
4h.className+" "+k);l.className=k;h.render?h.render(l,b,h):l.appendChild(document.createTextNode(h.displayText||("string"==typeof h?h:h.text)));l.hintId=g}var g=e.cursorCoords(a.options.alignWithWord?b.from:null),r=g.left,t=g.bottom,n=!0;d.style.left=r+"px";d.style.top=t+"px";l=window.innerWidth||Math.max(document.body.offsetWidth,document.documentElement.offsetWidth);k=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(a.options.container||document.body).appendChild(d);
5h=d.getBoundingClientRect();if(0<h.bottom-k){var u=h.bottom-h.top;0<g.top-(g.bottom-h.top)-u?(d.style.top=(t=g.top-u)+"px",n=!1):u>k&&(d.style.height=k-5+"px",d.style.top=(t=g.bottom-h.top)+"px",k=e.getCursor(),b.from.ch!=k.ch&&(g=e.cursorCoords(k),d.style.left=(r=g.left)+"px",h=d.getBoundingClientRect()))}k=h.right-l;0<k&&(h.right-h.left>l&&(d.style.width=l-5+"px",k-=h.right-h.left-l),d.style.left=(r=g.left-k)+"px");e.addKeyMap(this.keyMap=w(a,{moveFocus:function(a,b){c.changeActive(c.selectedHint+
6a,b)},setFocus:function(a){c.changeActive(a)},menuSize:function(){return c.screenAmount()},length:m.length,close:function(){a.close()},pick:function(){c.pick()},data:b}));if(a.options.closeOnUnfocus){var p;e.on("blur",this.onBlur=function(){p=setTimeout(function(){a.close()},100)});e.on("focus",this.onFocus=function(){clearTimeout(p)})}var q=e.getScrollInfo();e.on("scroll",this.onScroll=function(){var c=e.getScrollInfo(),b=e.getWrapperElement().getBoundingClientRect(),f=t+q.top-c.top,g=f-(window.pageYOffset||
7(document.documentElement||document.body).scrollTop);n||(g+=d.offsetHeight);if(g<=b.top||g>=b.bottom)return a.close();d.style.top=f+"px";d.style.left=r+q.left-c.left+"px"});f.on(d,"dblclick",function(a){(a=v(d,a.target||a.srcElement))&&null!=a.hintId&&(c.changeActive(a.hintId),c.pick())});f.on(d,"click",function(b){(b=v(d,b.target||b.srcElement))&&null!=b.hintId&&(c.changeActive(b.hintId),a.options.completeOnSingleClick&&c.pick())});f.on(d,"mousedown",function(){setTimeout(function(){e.focus()},20)});
8f.signal(b,"select",m[0],d.firstChild);return!0}f.showHint=function(a,b,c){if(!b)return a.showHint(c);c&&c.async&&(b.async=!0);b={hint:b};if(c)for(var e in c)b[e]=c[e];return a.showHint(b)};f.defineExtension("showHint",function(a){1<this.listSelections().length||this.somethingSelected()||(this.state.completionActive&&this.state.completionActive.close(),a=this.state.completionActive=new p(this,a),a.options.hint&&(f.signal(this,"startCompletion",this),a.update()))});var x=window.requestAnimationFrame||
9function(a){return setTimeout(a,1E3/60)},y=window.cancelAnimationFrame||clearTimeout;p.prototype={close:function(){this.active()&&(this.tick=this.cm.state.completionActive=null,this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.widget.close(),f.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(a,b){var c=a.list[b];c.hint?c.hint(this.cm,a,c):this.cm.replaceRange("string"==typeof c?c:c.text,c.from||a.from,c.to||a.to,
10"complete");f.signal(a,"pick",c);this.close()},showHints:function(a){if(!a||!a.list.length||!this.active())return this.close();this.options.completeSingle&&1==a.list.length?this.pick(a,0):this.showWidget(a)},cursorActivity:function(){this.debounce&&(y(this.debounce),this.debounce=0);var a=this.cm.getCursor(),b=this.cm.getLine(a.line);if(a.line!=this.startPos.line||b.length-a.ch!=this.startLen-this.startPos.ch||a.ch<this.startPos.ch||this.cm.somethingSelected()||a.ch&&this.options.closeCharacters.test(b.charAt(a.ch-
111)))this.close();else{var c=this;this.debounce=x(function(){c.update()});this.widget&&this.widget.disable()}},update:function(){if(null!=this.tick)if(this.data&&f.signal(this.data,"update"),this.options.hint.async){var a=++this.tick,b=this;this.options.hint(this.cm,function(c){b.tick==a&&b.finishUpdate(c)},this.options)}else this.finishUpdate(this.options.hint(this.cm,this.options),a)},finishUpdate:function(a){this.data=a;var b=this.widget&&this.widget.picked;this.widget&&this.widget.close();a&&a.list.length&&
12(b&&1==a.list.length?this.pick(a,0):this.widget=new n(this,a))},showWidget:function(a){this.data=a;this.widget=new n(this,a);f.signal(a,"shown")},buildOptions:function(a){var b=this.cm.options.hintOptions,c={},e;for(e in q)c[e]=q[e];if(b)for(e in b)void 0!==b[e]&&(c[e]=b[e]);if(a)for(e in a)void 0!==a[e]&&(c[e]=a[e]);return c}};n.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null;this.hints.parentNode.removeChild(this.hints);this.completion.cm.removeKeyMap(this.keyMap);
13var a=this.completion.cm;this.completion.options.closeOnUnfocus&&(a.off("blur",this.onBlur),a.off("focus",this.onFocus));a.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var a=this;this.keyMap={Enter:function(){a.picked=!0}};this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(a,b){a>=this.data.list.length?a=b?this.data.list.length-1:0:0>a&&(a=b?0:this.data.list.length-1);
14if(this.selectedHint!=a){var c=this.hints.childNodes[this.selectedHint];c.className=c.className.replace(" CodeMirror-hint-active","");c=this.hints.childNodes[this.selectedHint=a];c.className+=" CodeMirror-hint-active";c.offsetTop<this.hints.scrollTop?this.hints.scrollTop=c.offsetTop-3:c.offsetTop+c.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=c.offsetTop+c.offsetHeight-this.hints.clientHeight+3);f.signal(this.data,"select",this.data.list[this.selectedHint],c)}},
15screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}};f.registerHelper("hint","auto",function(a,b){var c=a.getHelpers(a.getCursor(),"hint");if(c.length)for(var e=0;e<c.length;e++){var d=c[e](a,b);if(d&&d.list.length)return d}else if(c=a.getHelper(a.getCursor(),"hintWords")){if(c)return f.hint.fromList(a,{words:c})}else if(f.hint.anyword)return f.hint.anyword(a,b)});f.registerHelper("hint","fromList",function(a,b){for(var c=a.getCursor(),e=a.getTokenAt(c),
16d=[],m=0;m<b.words.length;m++){var g=b.words[m];g.slice(0,e.string.length)==e.string&&d.push(g)}if(d.length)return{list:d,from:f.Pos(c.line,e.start),to:f.Pos(c.line,e.end)}});f.commands.autocomplete=f.showHint;var q={hint:f.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnUnfocus:!0,completeOnSingleClick:!1,container:null,customKeys:null,extraKeys:null};f.defineOption("hintOptions",null)}); \ No newline at end of file