diff options
Diffstat (limited to 'release/samples/old')
36 files changed, 4579 insertions, 0 deletions
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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>Ajax — 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> » 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><div></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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>API Usage — 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. | ||
16 | CKEDITOR.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 | |||
24 | function 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 | |||
40 | function 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 | |||
56 | function 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 | |||
66 | function 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 | |||
75 | function 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 | |||
90 | function 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 | |||
99 | function 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 | |||
108 | function Focus() { | ||
109 | CKEDITOR.instances.editor1.focus(); | ||
110 | } | ||
111 | |||
112 | function onFocus() { | ||
113 | document.getElementById( 'eMessage' ).innerHTML = '<b>' + this.name + ' is focused </b>'; | ||
114 | } | ||
115 | |||
116 | function 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> » 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"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></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 "bold" Command"> | ||
178 | <input id="exec-link" onclick="ExecuteCommand('link');" type="button" value="Execute "link" 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"><h2>Test</h2><p>This is some <a href="/Test1.html">sample</a> HTML code.</p></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 | |||
192 | Second 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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For 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 — 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> » 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 © 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 | */ | ||
11 | body | ||
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 | |||
185 | code | ||
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 | |||
194 | kbd | ||
195 | { | ||
196 | padding: 0px 1px 0px 1px; | ||
197 | border-width: 1px 2px 2px 1px; | ||
198 | border-style: solid; | ||
199 | } | ||
200 | |||
201 | blockquote | ||
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 | /* | ||
4 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
5 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
6 | */ | ||
7 | ?> | ||
8 | <html> | ||
9 | <head> | ||
10 | <meta charset="utf-8"> | ||
11 | <title>Sample — CKEditor</title> | ||
12 | <link rel="stylesheet" href="sample.css"> | ||
13 | </head> | ||
14 | <body> | ||
15 | <h1 class="samples"> | ||
16 | CKEditor — 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 Name</th> | ||
23 | <th>Value</th> | ||
24 | </tr> | ||
25 | </thead> | ||
26 | <?php | ||
27 | |||
28 | if (!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 © 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 | */ | ||
5 | var 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", | ||
6 | hi:"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", | ||
7 | tr:"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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>Data Filtering — 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> » 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"> | ||
39 | editor.setData( '<p>Hello world!</p>' ); | ||
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><a></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"> | ||
83 | var 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. | ||
92 | editor.setData( '<p <strong>style="color: red"</strong>>Hello <strong><em>world</em></strong>!</p>' ); | ||
93 | alert( editor.getData() ); | ||
94 | |||
95 | // Filtered data is returned. | ||
96 | "<p>Hello world!</p>" | ||
97 | </pre> | ||
98 | <p> | ||
99 | What happened? Since <code>config.allowedContent: 'p'</code> is set the editor assumes | ||
100 | that only plain <code><p></code> are accepted. Nothing more. This is why | ||
101 | <code>style</code> attribute and <code><em></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"> | ||
117 | CKEDITOR.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><a></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><a></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><a></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 | <h1><img alt="Saturn V carrying Apollo 11" class="right" src="assets/sample.jpg"/> Apollo 11</h1> <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> <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> <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2> <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p> <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> <h2>Technical details <a id="tech-details" name="tech-details"></a></h2> <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;"> <caption><strong>Mission crew</strong></caption> <thead> <tr> <th scope="col">Position</th> <th scope="col">Astronaut</th> </tr> </thead> <tbody> <tr> <td>Commander</td> <td>Neil A. Armstrong</td> </tr> <tr> <td>Command Module Pilot</td> <td>Michael Collins</td> </tr> <tr> <td>Lunar Module Pilot</td> <td>Edwin &quot;Buzz&quot; E. Aldrin, Jr.</td> </tr> </tbody> </table> <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> <ol> <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li> <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li> <li><strong>Lunar Module</strong> for landing on the Moon.</li> </ol> <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> <hr/> <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p> | ||
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"> | ||
191 | CKEDITOR.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><a></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><img></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><span></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><u></code>, <code><sub></code>, <code><sup></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 | <h1><img alt="Saturn V carrying Apollo 11" class="right" src="assets/sample.jpg"/> Apollo 11</h1> <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> <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> <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2> <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p> <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> <h2>Technical details <a id="tech-details" name="tech-details"></a></h2> <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;"> <caption><strong>Mission crew</strong></caption> <thead> <tr> <th scope="col">Position</th> <th scope="col">Astronaut</th> </tr> </thead> <tbody> <tr> <td>Commander</td> <td>Neil A. Armstrong</td> </tr> <tr> <td>Command Module Pilot</td> <td>Michael Collins</td> </tr> <tr> <td>Lunar Module Pilot</td> <td>Edwin &quot;Buzz&quot; E. Aldrin, Jr.</td> </tr> </tbody> </table> <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> <ol> <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li> <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li> <li><strong>Lunar Module</strong> for landing on the Moon.</li> </ol> <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> <hr/> <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p> | ||
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"> | ||
285 | CKEDITOR.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 | <h1><img alt="Saturn V carrying Apollo 11" class="right" src="assets/sample.jpg"/> Apollo 11</h1> <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> <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> <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2> <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p> <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> <h2>Technical details <a id="tech-details" name="tech-details"></a></h2> <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;"> <caption><strong>Mission crew</strong></caption> <thead> <tr> <th scope="col">Position</th> <th scope="col">Astronaut</th> </tr> </thead> <tbody> <tr> <td>Commander</td> <td>Neil A. Armstrong</td> </tr> <tr> <td>Command Module Pilot</td> <td>Michael Collins</td> </tr> <tr> <td>Lunar Module Pilot</td> <td>Edwin &quot;Buzz&quot; E. Aldrin, Jr.</td> </tr> </tbody> </table> <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> <ol> <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li> <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li> <li><strong>Lunar Module</strong> for landing on the Moon.</li> </ol> <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> <hr/> <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p> | ||
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"> | ||
335 | CKEDITOR.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 | <h1><img alt="Saturn V carrying Apollo 11" class="right" src="assets/sample.jpg"/> Apollo 11</h1> <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> <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> <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2> <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p> <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> <h2>Technical details <a id="tech-details" name="tech-details"></a></h2> <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;"> <caption><strong>Mission crew</strong></caption> <thead> <tr> <th scope="col">Position</th> <th scope="col">Astronaut</th> </tr> </thead> <tbody> <tr> <td>Commander</td> <td>Neil A. Armstrong</td> </tr> <tr> <td>Command Module Pilot</td> <td>Michael Collins</td> </tr> <tr> <td>Lunar Module Pilot</td> <td>Edwin &quot;Buzz&quot; E. Aldrin, Jr.</td> </tr> </tbody> </table> <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> <ol> <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li> <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li> <li><strong>Lunar Module</strong> for landing on the Moon.</li> </ol> <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> <hr/> <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p> | ||
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><h1></code> element. | ||
375 | <abbr title="Advanced Content Filter">ACF</abbr> takes care of | ||
376 | what can be included in <code><h1></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><h1></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"> | ||
407 | CKEDITOR.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 | <h1><img alt="Saturn V carrying Apollo 11" class="right" src="assets/sample.jpg"/> Apollo 11</h1> <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> <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> <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2> <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p> <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> <h2>Technical details <a id="tech-details" name="tech-details"></a></h2> <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;"> <caption><strong>Mission crew</strong></caption> <thead> <tr> <th scope="col">Position</th> <th scope="col">Astronaut</th> </tr> </thead> <tbody> <tr> <td>Commander</td> <td>Neil A. Armstrong</td> </tr> <tr> <td>Command Module Pilot</td> <td>Michael Collins</td> </tr> <tr> <td>Lunar Module Pilot</td> <td>Edwin &quot;Buzz&quot; E. Aldrin, Jr.</td> </tr> </tbody> </table> <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> <ol> <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li> <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li> <li><strong>Lunar Module</strong> for landing on the Moon.</li> </ol> <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> <hr/> <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p> | ||
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"> | ||
462 | CKEDITOR.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 | <h1><img alt="Saturn V carrying Apollo 11" class="right" src="assets/sample.jpg"/> Apollo 11</h1> <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> <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> <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2> <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p> <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> <h2>Technical details <a id="tech-details" name="tech-details"></a></h2> <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;"> <caption><strong>Mission crew</strong></caption> <thead> <tr> <th scope="col">Position</th> <th scope="col">Astronaut</th> </tr> </thead> <tbody> <tr> <td>Commander</td> <td>Neil A. Armstrong</td> </tr> <tr> <td>Command Module Pilot</td> <td>Michael Collins</td> </tr> <tr> <td>Lunar Module Pilot</td> <td>Edwin &quot;Buzz&quot; E. Aldrin, Jr.</td> </tr> </tbody> </table> <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> <ol> <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li> <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li> <li><strong>Lunar Module</strong> for landing on the Moon.</li> </ol> <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> <hr/> <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p> | ||
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 © 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 | |||
6 | CKEDITOR.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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For 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 — 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> » 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> – "My Dialog" dialog window opened with the "My Dialog" toolbar button.</li> | ||
156 | <li><strong>Creating a custom button</strong> – Add button to open the dialog with "My Dialog" toolbar button.</li> | ||
157 | </ol> | ||
158 | <textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></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> – Add new tab "My Tab" to dialog window.</li> | ||
166 | <li><strong>Removing a dialog window tab</strong> – Remove "Second Tab" page from the dialog window.</li> | ||
167 | <li><strong>Adding dialog window fields</strong> – Add "My Custom Field" to the dialog window.</li> | ||
168 | <li><strong>Removing dialog window field</strong> – Remove "Select Field" selection field from the dialog window.</li> | ||
169 | <li><strong>Setting default values for dialog window fields</strong> – Set default value of "Text Field" text field. </li> | ||
170 | <li><strong>Setup initial focus for dialog window</strong> – Put initial focus on "My Custom Field" text field. </li> | ||
171 | </ol> | ||
172 | <textarea cols="80" id="editor2" name="editor2" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>Replace DIV — 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> » 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><div></code> elements | ||
80 | with a CKEditor instance on the fly, following user's doubleclick. The content | ||
81 | that was previously placed inside the <code><div></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><div></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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>ENTER Key Configuration — 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 "Enter" key in CKEditor"> | ||
13 | <meta name="ckeditor-sample-group" content="Advanced Samples"> | ||
14 | <meta name="ckeditor-sample-description" content="Configuring the behavior of <em>Enter</em> and <em>Shift+Enter</em> 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> » 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> – new <code><p></code> paragraphs are created;</li> | ||
54 | <li><strong><code>ENTER_BR</code></strong> – lines are broken with <code><br></code> elements;</li> | ||
55 | <li><strong><code>ENTER_DIV</code></strong> – new <code><div></code> blocks are created.</li> | ||
56 | </ul> | ||
57 | <p> | ||
58 | The sample code below shows how to configure CKEditor to create a <code><div></code> block when <em>Enter</em> key is pressed. | ||
59 | </p> | ||
60 | <pre class="samples"> | ||
61 | CKEDITOR.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><textarea></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 <P> (recommended)</option> | ||
73 | <option value="3">Create a new <DIV></option> | ||
74 | <option value="2">Break the line with a <BR></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 <P></option> | ||
81 | <option value="3">Create a new <DIV></option> | ||
82 | <option selected="selected" value="2">Break the line with a <BR> (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 <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</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 © 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 @@ | |||
1 | var 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= | ||
2 | n.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()} | ||
3 | function 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< | ||
4 | k;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)} | ||
5 | function 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"+ | ||
6 | f+"\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== | ||
10 | b.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(), | ||
13 | c=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)? | ||
16 | w():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)}, | ||
17 | embedSWF: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, | ||
18 | m,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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>Output for Flash — 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> » 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&file=00000922.html"> | ||
43 | Adobe Flash</a>. | ||
44 | The code will contain a subset of standard HTML elements like <code><b></code>, | ||
45 | <code><i></code>, and <code><p></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"><p><b><font size="18" style="font-size:18px;">Flash and HTML</font></b></p><p>&nbsp;</p><p>It is possible to have <a href="http://ckeditor.com">CKEditor</a> creating content that will be later loaded inside <b>Flash</b> objects and animations.</p><p>&nbsp;</p><p>Flash has a few limitations when dealing with HTML:</p><p>&nbsp;</p><ul><li>It has limited support on tags.</li><li>There is no margin between block elements, like paragraphs.</li></ul></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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>HTML Compliant Output — 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> » 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><b></code>, | ||
30 | <code><i></code>, and <code><font></code> are used in place of | ||
31 | <code><strong></code>, <code><em></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"> | ||
42 | CKEDITOR.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"><p>This is some <b>sample text</b>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For 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 <html> to </html>.</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 "Enter" 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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>Massive inline editing — 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> » 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"><div <strong>contenteditable="true</strong>" > ... </div></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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For 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 — 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> » 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. | ||
36 | CKEDITOR.disableAutoInline = true; | ||
37 | |||
38 | var 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><div></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 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 "Buzz" 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>'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'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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For 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 — 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> » 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. | ||
42 | var 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 | <h2>Technical details <a id="tech-details" name="tech-details"></a></h2> | ||
54 | |||
55 | <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;"> | ||
56 | <caption><strong>Mission crew</strong></caption> | ||
57 | <thead> | ||
58 | <tr> | ||
59 | <th scope="col">Position</th> | ||
60 | <th scope="col">Astronaut</th> | ||
61 | </tr> | ||
62 | </thead> | ||
63 | <tbody> | ||
64 | <tr> | ||
65 | <td>Commander</td> | ||
66 | <td>Neil A. Armstrong</td> | ||
67 | </tr> | ||
68 | <tr> | ||
69 | <td>Command Module Pilot</td> | ||
70 | <td>Michael Collins</td> | ||
71 | </tr> | ||
72 | <tr> | ||
73 | <td>Lunar Module Pilot</td> | ||
74 | <td>Edwin "Buzz" E. Aldrin, Jr.</td> | ||
75 | </tr> | ||
76 | </tbody> | ||
77 | </table> | ||
78 | |||
79 | <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>'s Apollo program. The Apollo spacecraft had three parts:</p> | ||
80 | |||
81 | <ol> | ||
82 | <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li> | ||
83 | <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li> | ||
84 | <li><strong>Lunar Module</strong> for landing on the Moon.</li> | ||
85 | </ol> | ||
86 | |||
87 | <p>After being sent to the Moon by the Saturn V'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> | ||
88 | |||
89 | <hr /> | ||
90 | <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p> | ||
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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>jQuery Adapter — 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> » 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 | <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | ||
54 | <script src="/ckedit../../ckeditor.js"></script> | ||
55 | <script src="/ckeditor/adapters/jquery.js"></script> | ||
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 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 | <h2>Technical details <a id="tech-details" name="tech-details"></a></h2> <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;"> <caption><strong>Mission crew</strong></caption> <thead> <tr> <th scope="col">Position</th> <th scope="col">Astronaut</th> </tr> </thead> <tbody> <tr> <td>Commander</td> <td>Neil A. Armstrong</td> </tr> <tr> <td>Command Module Pilot</td> <td>Michael Collins</td> </tr> <tr> <td>Lunar Module Pilot</td> <td>Edwin &quot;Buzz&quot; E. Aldrin, Jr.</td> </tr> </tbody> </table> <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> <ol> <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li> <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li> <li><strong>Lunar Module</strong> for landing on the Moon.</li> </ol> <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> <hr/> <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p> | ||
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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>Using Magicline plugin — 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> » 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 | <table border="1" cellpadding="1" cellspacing="1" style="width: 100%; "> | ||
49 | <tbody> | ||
50 | <tr> | ||
51 | <td>This table</td> | ||
52 | <td>is the</td> | ||
53 | <td>very first</td> | ||
54 | <td>element of the document.</td> | ||
55 | </tr> | ||
56 | <tr> | ||
57 | <td>We are still</td> | ||
58 | <td>able to acces</td> | ||
59 | <td>the space before it.</td> | ||
60 | <td> | ||
61 | <table border="1" cellpadding="1" cellspacing="1" style="width: 100%; "> | ||
62 | <tbody> | ||
63 | <tr> | ||
64 | <td>This table is inside of a cell of another table.</td> | ||
65 | </tr> | ||
66 | <tr> | ||
67 | <td>We can type&nbsp;either before or after it though.</td> | ||
68 | </tr> | ||
69 | </tbody> | ||
70 | </table> | ||
71 | </td> | ||
72 | </tr> | ||
73 | </tbody> | ||
74 | </table> | ||
75 | |||
76 | <p>Two succesive horizontal lines (<tt>HR</tt> tags). We can access the space in between:</p> | ||
77 | |||
78 | <hr /> | ||
79 | <hr /> | ||
80 | <ol> | ||
81 | <li>This numbered list...</li> | ||
82 | <li>...is a neighbour of a horizontal line...</li> | ||
83 | <li>...and another list.</li> | ||
84 | </ol> | ||
85 | |||
86 | <ul> | ||
87 | <li>We can type between the lists...</li> | ||
88 | <li>...thanks to <strong>Magicline</strong>.</li> | ||
89 | </ul> | ||
90 | |||
91 | <p>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.</p> | ||
92 | |||
93 | <p>Quisque iaculis, dui lectus varius vitae, tortor. Proin lacus. Pellentesque ac lacus. Aenean nonummy commodo nec, pede. Etiam blandit risus elit.</p> | ||
94 | |||
95 | <p>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.</p> | ||
96 | |||
97 | <div style="border: 2px dashed green; background: #ddd; text-align: center;"> | ||
98 | <p>This text is wrapped in a&nbsp;<tt>DIV</tt>&nbsp;element. We can type after this element though.</p> | ||
99 | </div> | ||
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"> | ||
125 | CKEDITOR.replace( 'editor2', { | ||
126 | magicline_color: 'blue' | ||
127 | });</pre> | ||
128 | </div> | ||
129 | <textarea cols="80" id="editor2" name="editor2" rows="10"> | ||
130 | <table border="1" cellpadding="1" cellspacing="1" style="width: 100%; "> | ||
131 | <tbody> | ||
132 | <tr> | ||
133 | <td>This table</td> | ||
134 | <td>is the</td> | ||
135 | <td>very first</td> | ||
136 | <td>element of the document.</td> | ||
137 | </tr> | ||
138 | <tr> | ||
139 | <td>We are still</td> | ||
140 | <td>able to acces</td> | ||
141 | <td>the space before it.</td> | ||
142 | <td> | ||
143 | <table border="1" cellpadding="1" cellspacing="1" style="width: 100%; "> | ||
144 | <tbody> | ||
145 | <tr> | ||
146 | <td>This table is inside of a cell of another table.</td> | ||
147 | </tr> | ||
148 | <tr> | ||
149 | <td>We can type&nbsp;either before or after it though.</td> | ||
150 | </tr> | ||
151 | </tbody> | ||
152 | </table> | ||
153 | </td> | ||
154 | </tr> | ||
155 | </tbody> | ||
156 | </table> | ||
157 | |||
158 | <p>Two succesive horizontal lines (<tt>HR</tt> tags). We can access the space in between:</p> | ||
159 | |||
160 | <hr /> | ||
161 | <hr /> | ||
162 | <ol> | ||
163 | <li>This numbered list...</li> | ||
164 | <li>...is a neighbour of a horizontal line...</li> | ||
165 | <li>...and another list.</li> | ||
166 | </ol> | ||
167 | |||
168 | <ul> | ||
169 | <li>We can type between the lists...</li> | ||
170 | <li>...thanks to <strong>Magicline</strong>.</li> | ||
171 | </ul> | ||
172 | |||
173 | <p>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.</p> | ||
174 | |||
175 | <p>Quisque iaculis, dui lectus varius vitae, tortor. Proin lacus. Pellentesque ac lacus. Aenean nonummy commodo nec, pede. Etiam blandit risus elit.</p> | ||
176 | |||
177 | <p>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.</p> | ||
178 | |||
179 | <div style="border: 2px dashed green; background: #ddd; text-align: center;"> | ||
180 | <p>This text is wrapped in a&nbsp;<tt>DIV</tt>&nbsp;element. We can type after this element though.</p> | ||
181 | </div> | ||
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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For 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 — 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> » 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"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For 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 — 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> » 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><textarea></code> elements | ||
23 | of a given class with a CKEditor instance. | ||
24 | </p> | ||
25 | <p> | ||
26 | To replace a <code><textarea></code> element, simply assign it the <code>ckeditor</code> | ||
27 | class, as in the code below: | ||
28 | </p> | ||
29 | <pre class="samples"> | ||
30 | <textarea <strong>class="ckeditor</strong>" name="editor1"></textarea> | ||
31 | </pre> | ||
32 | <p> | ||
33 | Note that other <code><textarea></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 | <h1><img alt="Saturn V carrying Apollo 11" class="right" src="assets/sample.jpg"/> Apollo 11</h1> <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> <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> <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2> <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p> <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> <h2>Technical details <a id="tech-details" name="tech-details"></a></h2> <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;"> <caption><strong>Mission crew</strong></caption> <thead> <tr> <th scope="col">Position</th> <th scope="col">Astronaut</th> </tr> </thead> <tbody> <tr> <td>Commander</td> <td>Neil A. Armstrong</td> </tr> <tr> <td>Command Module Pilot</td> <td>Michael Collins</td> </tr> <tr> <td>Lunar Module Pilot</td> <td>Edwin &quot;Buzz&quot; E. Aldrin, Jr.</td> </tr> </tbody> </table> <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> <ol> <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li> <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li> <li><strong>Lunar Module</strong> for landing on the Moon.</li> </ol> <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> <hr/> <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p> | ||
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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For 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 — 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> » 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><iframe></code> element-based editing area, provided by the <strong>Wysiwygarea</strong> plugin. | ||
24 | </p> | ||
25 | <pre class="samples"> | ||
26 | CKEDITOR.replace( '<em>textarea_id</em>' ) | ||
27 | </pre> | ||
28 | </div> | ||
29 | <textarea cols="80" id="editor1" name="editor1" rows="10"> | ||
30 | <h1><img alt="Saturn V carrying Apollo 11" class="right" src="assets/sample.jpg"/> Apollo 11</h1> <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> <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> <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2> <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p> <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> <h2>Technical details <a id="tech-details" name="tech-details"></a></h2> <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;"> <caption><strong>Mission crew</strong></caption> <thead> <tr> <th scope="col">Position</th> <th scope="col">Astronaut</th> </tr> </thead> <tbody> <tr> <td>Commander</td> <td>Neil A. Armstrong</td> </tr> <tr> <td>Command Module Pilot</td> <td>Michael Collins</td> </tr> <tr> <td>Lunar Module Pilot</td> <td>Edwin &quot;Buzz&quot; E. Aldrin, Jr.</td> </tr> </tbody> </table> <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> <ol> <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li> <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li> <li><strong>Lunar Module</strong> for landing on the Moon.</li> </ol> <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> <hr/> <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p> | ||
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 © 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 | /* | ||
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 | html, 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 | |||
11 | body | ||
12 | { | ||
13 | padding: 10px 30px; | ||
14 | } | ||
15 | |||
16 | input, textarea, select, option, optgroup, button, td, th | ||
17 | { | ||
18 | font-size: 100%; | ||
19 | } | ||
20 | |||
21 | pre | ||
22 | { | ||
23 | -moz-tab-size: 4; | ||
24 | tab-size: 4; | ||
25 | } | ||
26 | |||
27 | pre, code, kbd, samp, tt | ||
28 | { | ||
29 | font-family: monospace,monospace; | ||
30 | font-size: 1em; | ||
31 | } | ||
32 | |||
33 | body { | ||
34 | width: 960px; | ||
35 | margin: 0 auto; | ||
36 | } | ||
37 | |||
38 | code | ||
39 | { | ||
40 | background: #f3f3f3; | ||
41 | border: 1px solid #ddd; | ||
42 | padding: 1px 4px; | ||
43 | border-radius: 3px; | ||
44 | } | ||
45 | |||
46 | abbr | ||
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 | |||
83 | h1.samples | ||
84 | { | ||
85 | color: #0782C1; | ||
86 | font-size: 200%; | ||
87 | font-weight: normal; | ||
88 | margin: 0; | ||
89 | padding: 0; | ||
90 | } | ||
91 | |||
92 | h1.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 | |||
104 | h2.samples | ||
105 | { | ||
106 | color: #000000; | ||
107 | font-size: 130%; | ||
108 | margin: 15px 0 0 0; | ||
109 | padding: 0; | ||
110 | } | ||
111 | |||
112 | p, blockquote, address, form, pre, dl, h1.samples, h2.samples | ||
113 | { | ||
114 | margin-bottom: 15px; | ||
115 | } | ||
116 | |||
117 | ul.samples | ||
118 | { | ||
119 | margin-bottom: 15px; | ||
120 | } | ||
121 | |||
122 | .clear | ||
123 | { | ||
124 | clear: both; | ||
125 | } | ||
126 | |||
127 | fieldset | ||
128 | { | ||
129 | margin: 0; | ||
130 | padding: 10px; | ||
131 | } | ||
132 | |||
133 | body, input, textarea | ||
134 | { | ||
135 | color: #333333; | ||
136 | font-family: Arial, Helvetica, sans-serif; | ||
137 | } | ||
138 | |||
139 | body | ||
140 | { | ||
141 | font-size: 75%; | ||
142 | } | ||
143 | |||
144 | a.samples | ||
145 | { | ||
146 | color: #189DE1; | ||
147 | text-decoration: none; | ||
148 | } | ||
149 | |||
150 | form | ||
151 | { | ||
152 | margin: 0; | ||
153 | padding: 0; | ||
154 | } | ||
155 | |||
156 | pre.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 | |||
225 | label | ||
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 | |||
286 | dl.samples | ||
287 | { | ||
288 | padding: 0 0 0 40px; | ||
289 | } | ||
290 | dl.samples > dt | ||
291 | { | ||
292 | display: list-item; | ||
293 | list-style-type: disc; | ||
294 | list-style-position: outside; | ||
295 | margin: 0 0 3px; | ||
296 | } | ||
297 | dl.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 | |||
316 | blockquote | ||
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 | |||
340 | img.right { | ||
341 | border: 1px solid #ccc; | ||
342 | float: right; | ||
343 | margin-left: 15px; | ||
344 | padding: 5px; | ||
345 | } | ||
346 | |||
347 | img.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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For 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 — 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> » 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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>Toolbar Configuration — 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> » 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"> | ||
42 | CKEDITOR.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"> | ||
64 | CKEDITOR.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"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></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"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>UI Color Picker — 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> » 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><textarea></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"> | ||
34 | CKEDITOR.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><textarea></code> element to be replaced. | ||
40 | </p> | ||
41 | <p> | ||
42 | <textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>User Interface Globalization — 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> » 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><textarea></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"> | ||
43 | CKEDITOR.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><textarea></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"><p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>Full Page Editing — 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 <html> to </html>."> | ||
17 | </head> | ||
18 | <body> | ||
19 | <h1 class="samples"> | ||
20 | <a href="../../../samples/old/index.html">CKEditor Samples</a> » 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><html></code> tag to the <code></html></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"> | ||
34 | CKEDITOR.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><textarea></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><body></code> element, so content like meta and title can be changed: | ||
52 | </label> | ||
53 | <textarea cols="80" id="editor1" name="editor1" rows="10"> | ||
54 | <h1><img align="right" alt="Saturn V carrying Apollo 11" src="../../../samples/old/assets/sample.jpg"/> Apollo 11</h1> <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> <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> <h2>Broadcasting and <em>quotes</em> <a id="quotes" name="quotes"></a></h2> <p>Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:</p> <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> <h2>Technical details <a id="tech-details" name="tech-details"></a></h2> <table align="right" border="1" bordercolor="#ccc" cellpadding="5" cellspacing="0" style="border-collapse:collapse;margin:10px 0 10px 15px;"> <caption><strong>Mission crew</strong></caption> <thead> <tr> <th scope="col">Position</th> <th scope="col">Astronaut</th> </tr> </thead> <tbody> <tr> <td>Commander</td> <td>Neil A. Armstrong</td> </tr> <tr> <td>Command Module Pilot</td> <td>Michael Collins</td> </tr> <tr> <td>Lunar Module Pilot</td> <td>Edwin &quot;Buzz&quot; E. Aldrin, Jr.</td> </tr> </tbody> </table> <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> <ol> <li><strong>Command Module</strong> with a cabin for the three astronauts which was the only part which landed back on Earth</li> <li><strong>Service Module</strong> which supported the Command Module with propulsion, electrical power, oxygen and water</li> <li><strong>Lunar Module</strong> for landing on the Moon.</li> </ol> <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> <hr/> <p style="text-align: right;"><small>Source: <a href="http://en.wikipedia.org/wiki/Apollo_11">Wikipedia.org</a></small></p> | ||
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 © 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 | <!-- | ||
3 | Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. | ||
4 | For licensing, see LICENSE.md or http://ckeditor.com/license | ||
5 | --> | ||
6 | <html> | ||
7 | <head> | ||
8 | <meta charset="utf-8"> | ||
9 | <title>XHTML Compliant Output — 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> » 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><font></code>, <code><u></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"> | ||
38 | CKEDITOR.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"><p>This is some <span class="Bold">sample text</span>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></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 © 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> | ||