ckeditor 4.0.7 → 4.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. data/README.md +16 -2
  2. data/app/assets/javascripts/ckeditor/application.js +1 -0
  3. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/application.js.erb +10 -0
  4. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.endless-scroll.js +300 -0
  5. data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.erb +4 -0
  6. data/app/controllers/ckeditor/attachment_files_controller.rb +3 -1
  7. data/app/controllers/ckeditor/pictures_controller.rb +3 -1
  8. data/app/views/ckeditor/attachment_files/index.html.erb +11 -5
  9. data/app/views/ckeditor/pictures/index.html.erb +12 -6
  10. data/app/views/ckeditor/shared/_asset.html.erb +1 -1
  11. data/app/views/ckeditor/shared/_asset_tmpl.html.erb +1 -1
  12. data/config/locales/cs.ckeditor.yml +1 -0
  13. data/config/locales/de.ckeditor.yml +1 -0
  14. data/config/locales/el-GR.cdkeditor.yml +2 -1
  15. data/config/locales/en.ckeditor.yml +1 -0
  16. data/config/locales/es.ckeditor.yml +1 -0
  17. data/config/locales/fr.ckeditor.yml +1 -0
  18. data/config/locales/hu.ckeditor.yml +1 -0
  19. data/config/locales/it.ckeditor.yml +1 -0
  20. data/config/locales/nl.ckeditor.yml +2 -1
  21. data/config/locales/pl.ckeditor.yml +1 -0
  22. data/config/locales/pt-BR.ckeditor.yml +2 -1
  23. data/config/locales/pt-PT.ckeditor.yml +1 -0
  24. data/config/locales/ru.ckeditor.yml +1 -0
  25. data/config/locales/sv-SE.ckeditor.yml +1 -0
  26. data/config/locales/uk.ckeditor.yml +1 -0
  27. data/config/locales/zh-CN.ckeditor.yml +1 -0
  28. data/lib/ckeditor.rb +11 -0
  29. data/lib/ckeditor/helpers/controllers.rb +1 -1
  30. data/lib/ckeditor/paginatable.rb +56 -0
  31. data/lib/ckeditor/utils.rb +41 -18
  32. data/lib/ckeditor/version.rb +2 -2
  33. data/lib/generators/ckeditor/templates/ckeditor.rb +3 -0
  34. data/test/dummy/public/uploads/tmp/20140108-1222-52217-3986/rails.tar.gz +0 -0
  35. data/test/dummy/public/uploads/tmp/20140108-1222-52217-6261/rails.tar.gz +0 -0
  36. data/test/dummy/public/uploads/tmp/20140108-1222-52217-6421/rails.tar.gz +0 -0
  37. data/test/dummy/public/uploads/tmp/20140108-1223-52217-3058/content_rails.png +0 -0
  38. data/test/dummy/public/uploads/tmp/20140108-1223-52217-3058/rails.png +0 -0
  39. data/test/dummy/public/uploads/tmp/20140108-1223-52217-3058/thumb_rails.png +0 -0
  40. data/test/dummy/public/uploads/tmp/20140108-1223-52217-3990/content_rails.png +0 -0
  41. data/test/dummy/public/uploads/tmp/20140108-1223-52217-3990/rails.png +0 -0
  42. data/test/dummy/public/uploads/tmp/20140108-1223-52217-3990/thumb_rails.png +0 -0
  43. data/test/dummy/public/uploads/tmp/20140108-1223-52217-8126/content_rails.png +0 -0
  44. data/test/dummy/public/uploads/tmp/20140108-1223-52217-8126/rails.png +0 -0
  45. data/test/dummy/public/uploads/tmp/20140108-1223-52217-8126/thumb_rails.png +0 -0
  46. data/test/dummy/public/uploads/tmp/20140108-1228-52513-0400/content_rails.png +0 -0
  47. data/test/dummy/public/uploads/tmp/20140108-1228-52513-0400/rails.png +0 -0
  48. data/test/dummy/public/uploads/tmp/20140108-1228-52513-0400/thumb_rails.png +0 -0
  49. data/test/dummy/public/uploads/tmp/20140108-1228-52513-1537/content_rails.png +0 -0
  50. data/test/dummy/public/uploads/tmp/20140108-1228-52513-1537/rails.png +0 -0
  51. data/test/dummy/public/uploads/tmp/20140108-1228-52513-1537/thumb_rails.png +0 -0
  52. data/test/dummy/public/uploads/tmp/20140108-1228-52513-4718/rails.tar.gz +0 -0
  53. data/test/dummy/public/uploads/tmp/20140108-1228-52513-4820/rails.tar.gz +0 -0
  54. data/test/dummy/public/uploads/tmp/20140108-1228-52513-8057/content_rails.png +0 -0
  55. data/test/dummy/public/uploads/tmp/20140108-1228-52513-8057/rails.png +0 -0
  56. data/test/dummy/public/uploads/tmp/20140108-1228-52513-8057/thumb_rails.png +0 -0
  57. data/test/dummy/public/uploads/tmp/20140108-1228-52513-9147/rails.tar.gz +0 -0
  58. data/test/dummy/public/uploads/tmp/20140108-1228-52590-3606/rails.tar.gz +0 -0
  59. data/test/dummy/public/uploads/tmp/20140108-1228-52590-4369/content_rails.png +0 -0
  60. data/test/dummy/public/uploads/tmp/20140108-1228-52590-4369/rails.png +0 -0
  61. data/test/dummy/public/uploads/tmp/20140108-1228-52590-4369/thumb_rails.png +0 -0
  62. data/test/dummy/public/uploads/tmp/20140108-1228-52590-4698/rails.tar.gz +0 -0
  63. data/test/dummy/public/uploads/tmp/20140108-1228-52590-7541/rails.tar.gz +0 -0
  64. data/test/dummy/public/uploads/tmp/20140108-1228-52590-9146/content_rails.png +0 -0
  65. data/test/dummy/public/uploads/tmp/20140108-1228-52590-9146/rails.png +0 -0
  66. data/test/dummy/public/uploads/tmp/20140108-1228-52590-9146/thumb_rails.png +0 -0
  67. data/test/dummy/public/uploads/tmp/20140108-1228-52590-9782/content_rails.png +0 -0
  68. data/test/dummy/public/uploads/tmp/20140108-1228-52590-9782/rails.png +0 -0
  69. data/test/dummy/public/uploads/tmp/20140108-1228-52590-9782/thumb_rails.png +0 -0
  70. data/test/dummy/public/uploads/tmp/20140108-1230-52768-3256/content_rails.png +0 -0
  71. data/test/dummy/public/uploads/tmp/20140108-1230-52768-3256/rails.png +0 -0
  72. data/test/dummy/public/uploads/tmp/20140108-1230-52768-3256/thumb_rails.png +0 -0
  73. data/test/dummy/public/uploads/tmp/20140108-1230-52768-3565/content_rails.png +0 -0
  74. data/test/dummy/public/uploads/tmp/20140108-1230-52768-3565/rails.png +0 -0
  75. data/test/dummy/public/uploads/tmp/20140108-1230-52768-3565/thumb_rails.png +0 -0
  76. data/test/dummy/public/uploads/tmp/20140108-1230-52768-4292/rails.tar.gz +0 -0
  77. data/test/dummy/public/uploads/tmp/20140108-1230-52768-4514/rails.tar.gz +0 -0
  78. data/test/dummy/public/uploads/tmp/20140108-1230-52768-7430/rails.tar.gz +0 -0
  79. data/test/dummy/public/uploads/tmp/20140108-1230-52768-9145/content_rails.png +0 -0
  80. data/test/dummy/public/uploads/tmp/20140108-1230-52768-9145/rails.png +0 -0
  81. data/test/dummy/public/uploads/tmp/20140108-1230-52768-9145/thumb_rails.png +0 -0
  82. data/vendor/assets/javascripts/ckeditor/CHANGES.md +36 -0
  83. data/vendor/assets/javascripts/ckeditor/ckeditor.js +465 -463
  84. data/vendor/assets/javascripts/ckeditor/config.js +1 -1
  85. data/vendor/assets/javascripts/ckeditor/contents.css +17 -0
  86. data/vendor/assets/javascripts/ckeditor/lang/ca.js +1 -1
  87. data/vendor/assets/javascripts/ckeditor/lang/cs.js +1 -1
  88. data/vendor/assets/javascripts/ckeditor/lang/cy.js +1 -1
  89. data/vendor/assets/javascripts/ckeditor/lang/de.js +1 -1
  90. data/vendor/assets/javascripts/ckeditor/lang/el.js +1 -1
  91. data/vendor/assets/javascripts/ckeditor/lang/en-au.js +1 -1
  92. data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +1 -1
  93. data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +1 -1
  94. data/vendor/assets/javascripts/ckeditor/lang/es.js +1 -1
  95. data/vendor/assets/javascripts/ckeditor/lang/fi.js +1 -1
  96. data/vendor/assets/javascripts/ckeditor/lang/it.js +1 -1
  97. data/vendor/assets/javascripts/ckeditor/lang/ja.js +1 -1
  98. data/vendor/assets/javascripts/ckeditor/lang/km.js +1 -1
  99. data/vendor/assets/javascripts/ckeditor/lang/nb.js +1 -1
  100. data/vendor/assets/javascripts/ckeditor/lang/nl.js +1 -1
  101. data/vendor/assets/javascripts/ckeditor/lang/no.js +1 -1
  102. data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +1 -1
  103. data/vendor/assets/javascripts/ckeditor/lang/ru.js +1 -1
  104. data/vendor/assets/javascripts/ckeditor/lang/sv.js +1 -1
  105. data/vendor/assets/javascripts/ckeditor/lang/tr.js +1 -1
  106. data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +1 -1
  107. data/vendor/assets/javascripts/ckeditor/lang/zh.js +1 -1
  108. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +3 -3
  109. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +2 -2
  110. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +1 -1
  111. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +7 -0
  112. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +16 -16
  113. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +12 -0
  114. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +1 -1
  115. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +31 -31
  116. data/vendor/assets/javascripts/ckeditor/samples/ajax.html +82 -0
  117. data/vendor/assets/javascripts/ckeditor/samples/api.html +207 -0
  118. data/vendor/assets/javascripts/ckeditor/samples/appendto.html +57 -0
  119. data/vendor/assets/javascripts/ckeditor/samples/assets/inlineall/logo.png +0 -0
  120. data/vendor/assets/javascripts/ckeditor/samples/assets/outputxhtml/outputxhtml.css +204 -0
  121. data/vendor/assets/javascripts/ckeditor/samples/assets/posteddata.php +59 -0
  122. data/vendor/assets/javascripts/ckeditor/samples/assets/sample.css +3 -0
  123. data/vendor/assets/javascripts/ckeditor/samples/assets/sample.jpg +0 -0
  124. data/vendor/assets/javascripts/ckeditor/samples/assets/uilanguages/languages.js +7 -0
  125. data/vendor/assets/javascripts/ckeditor/samples/datafiltering.html +401 -0
  126. data/vendor/assets/javascripts/ckeditor/samples/divreplace.html +141 -0
  127. data/vendor/assets/javascripts/ckeditor/samples/index.html +128 -0
  128. data/vendor/assets/javascripts/ckeditor/samples/inlineall.html +311 -0
  129. data/vendor/assets/javascripts/ckeditor/samples/inlinebycode.html +121 -0
  130. data/vendor/assets/javascripts/ckeditor/samples/inlinetextarea.html +110 -0
  131. data/vendor/assets/javascripts/ckeditor/samples/jquery.html +97 -0
  132. data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/assets/my_dialog.js +48 -0
  133. data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/dialog.html +187 -0
  134. data/vendor/assets/javascripts/ckeditor/samples/plugins/enterkey/enterkey.html +103 -0
  135. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
  136. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
  137. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js +18 -0
  138. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputforflash.html +280 -0
  139. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputhtml.html +221 -0
  140. data/vendor/assets/javascripts/ckeditor/samples/plugins/magicline/magicline.html +206 -0
  141. data/vendor/assets/javascripts/ckeditor/samples/plugins/toolbar/toolbar.html +232 -0
  142. data/vendor/assets/javascripts/ckeditor/samples/plugins/wysiwygarea/fullpage.html +77 -0
  143. data/vendor/assets/javascripts/ckeditor/samples/readonly.html +73 -0
  144. data/vendor/assets/javascripts/ckeditor/samples/replacebyclass.html +57 -0
  145. data/vendor/assets/javascripts/ckeditor/samples/replacebycode.html +56 -0
  146. data/vendor/assets/javascripts/ckeditor/samples/sample.css +356 -0
  147. data/vendor/assets/javascripts/ckeditor/samples/sample.js +50 -0
  148. data/vendor/assets/javascripts/ckeditor/samples/sample_posteddata.php +16 -0
  149. data/vendor/assets/javascripts/ckeditor/samples/tabindex.html +75 -0
  150. data/vendor/assets/javascripts/ckeditor/samples/uicolor.html +69 -0
  151. data/vendor/assets/javascripts/ckeditor/samples/uilanguages.html +119 -0
  152. data/vendor/assets/javascripts/ckeditor/samples/xhtmlstyle.html +231 -0
  153. metadata +139 -16
  154. data/test/dummy/db/test.sqlite3 +0 -0
  155. data/test/dummy/log/test.log +0 -1425
  156. data/test/tmp/app/models/ckeditor/asset.rb +0 -5
  157. data/test/tmp/app/models/ckeditor/attachment_file.rb +0 -12
  158. data/test/tmp/app/models/ckeditor/picture.rb +0 -13
  159. data/test/tmp/config/initializers/ckeditor.rb +0 -19
  160. data/test/tmp/config/routes.rb +0 -6
@@ -0,0 +1,207 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ Copyright (c) 2003-2013, 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 &mdash; CKEditor Sample</title>
10
+ <script src="../ckeditor.js"></script>
11
+ <link href="sample.css" rel="stylesheet">
12
+ <script>
13
+
14
+ // The instanceReady event is fired, when an instance of CKEditor has finished
15
+ // its initialization.
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> &raquo; Using CKEditor JavaScript API
126
+ </h1>
127
+ <div class="description">
128
+ <p>
129
+ This sample shows how to use the
130
+ <a class="samples" href="http://docs.ckeditor.com/#!/api/CKEDITOR.editor">CKEditor JavaScript API</a>
131
+ to interact with the editor at runtime.
132
+ </p>
133
+ <p>
134
+ For details on how to create this setup check the source code of this sample page.
135
+ </p>
136
+ </div>
137
+
138
+ <!-- This <div> holds alert messages to be display in the sample page. -->
139
+ <div id="alerts">
140
+ <noscript>
141
+ <p>
142
+ <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript
143
+ support, like yours, you should still see the contents (HTML data) and you should
144
+ be able to edit it normally, without a rich editor interface.
145
+ </p>
146
+ </noscript>
147
+ </div>
148
+ <form action="../../../samples/sample_posteddata.php" method="post">
149
+ <textarea cols="100" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
150
+
151
+ <script>
152
+ // Replace the <textarea id="editor1"> with an CKEditor instance.
153
+ CKEDITOR.replace( 'editor1', {
154
+ on: {
155
+ focus: onFocus,
156
+ blur: onBlur,
157
+
158
+ // Check for availability of corresponding plugins.
159
+ pluginsLoaded: function( evt ) {
160
+ var doc = CKEDITOR.document, ed = evt.editor;
161
+ if ( !ed.getCommand( 'bold' ) )
162
+ doc.getById( 'exec-bold' ).hide();
163
+ if ( !ed.getCommand( 'link' ) )
164
+ doc.getById( 'exec-link' ).hide();
165
+ }
166
+ }
167
+ });
168
+ </script>
169
+
170
+ <p id="eMessage">
171
+ </p>
172
+
173
+ <div id="eButtons" style="display: none">
174
+ <input id="exec-bold" onclick="ExecuteCommand('bold');" type="button" value="Execute &quot;bold&quot; Command">
175
+ <input id="exec-link" onclick="ExecuteCommand('link');" type="button" value="Execute &quot;link&quot; Command">
176
+ <input onclick="Focus();" type="button" value="Focus">
177
+ <br><br>
178
+ <input onclick="InsertHTML();" type="button" value="Insert HTML">
179
+ <input onclick="SetContents();" type="button" value="Set Editor Contents">
180
+ <input onclick="GetContents();" type="button" value="Get Editor Contents (HTML)">
181
+ <br>
182
+ <textarea cols="100" id="htmlArea" rows="3">&lt;h2&gt;Test&lt;/h2&gt;&lt;p&gt;This is some &lt;a href="/Test1.html"&gt;sample&lt;/a&gt; HTML code.&lt;/p&gt;</textarea>
183
+ <br>
184
+ <br>
185
+ <input onclick="InsertText();" type="button" value="Insert Text">
186
+ <br>
187
+ <textarea cols="100" id="txtArea" rows="3"> First line with some leading whitespaces.
188
+
189
+ Second line of text preceded by two line breaks.</textarea>
190
+ <br>
191
+ <br>
192
+ <input onclick="CheckDirty();" type="button" value="checkDirty()">
193
+ <input onclick="ResetDirty();" type="button" value="resetDirty()">
194
+ </div>
195
+ </form>
196
+ <div id="footer">
197
+ <hr>
198
+ <p>
199
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
200
+ </p>
201
+ <p id="copy">
202
+ Copyright &copy; 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
203
+ Knabben. All rights reserved.
204
+ </p>
205
+ </div>
206
+ </body>
207
+ </html>
@@ -0,0 +1,57 @@
1
+ <!DOCTYPE html>
2
+ <!--
3
+ Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
4
+ For licensing, see LICENSE.md or http://ckeditor.com/license
5
+ -->
6
+ <html>
7
+ <head>
8
+ <title>CKEDITOR.appendTo &mdash; CKEditor Sample</title>
9
+ <meta charset="utf-8">
10
+ <script src="../ckeditor.js"></script>
11
+ <link rel="stylesheet" href="sample.css">
12
+ </head>
13
+ <body>
14
+ <h1 class="samples">
15
+ <a href="index.html">CKEditor Samples</a> &raquo; Append To Page Element Using JavaScript Code
16
+ </h1>
17
+ <div id="section1">
18
+ <div class="description">
19
+ <p>
20
+ <code>CKEDITOR.appendTo</code> is basically to place editors
21
+ inside existing DOM elements. Unlike <code>CKEDITOR.replace</code>,
22
+ a target container to be replaced is no longer necessary. A new editor
23
+ instance is inserted directly wherever it is desired.
24
+ </p>
25
+ <pre class="samples">CKEDITOR.appendTo( '<em>container_id</em>',
26
+ { /* Configuration options to be used. */ }
27
+ 'Editor content to be used.'
28
+ );</pre>
29
+ </div>
30
+ <script>
31
+
32
+ // This call can be placed at any point after the
33
+ // <textarea>, or inside a <head><script> in a
34
+ // window.onload event handler.
35
+
36
+ // Replace the <textarea id="editor"> with an CKEditor
37
+ // instance, using default configurations.
38
+ CKEDITOR.appendTo( 'section1',
39
+ null,
40
+ '<p>This is some <strong>sample text</strong>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p>'
41
+ );
42
+
43
+ </script>
44
+ </div>
45
+ <br>
46
+ <div id="footer">
47
+ <hr>
48
+ <p>
49
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
50
+ </p>
51
+ <p id="copy">
52
+ Copyright &copy; 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
53
+ Knabben. All rights reserved.
54
+ </p>
55
+ </div>
56
+ </body>
57
+ </html>
@@ -0,0 +1,204 @@
1
+ /*
2
+ * Copyright (c) 2003-2013, 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
+ }