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,206 @@
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>Using Magicline plugin &mdash; CKEditor Sample</title>
9
+ <meta charset="utf-8">
10
+ <script src="../../../ckeditor.js"></script>
11
+ <link rel="stylesheet" href="../../../samples/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/index.html">CKEditor Samples</a> &raquo; Using Magicline plugin
19
+ </h1>
20
+ <div class="description">
21
+ <p>
22
+ This sample shows the advantages of <strong>Magicline</strong> plugin
23
+ which is to enhance the editing process. Thanks to this plugin,
24
+ a number of difficult focus spaces which are inaccessible due to
25
+ browser issues can now be focused.
26
+ </p>
27
+ <p>
28
+ <strong>Magicline</strong> plugin shows a red line with a handler
29
+ which, when clicked, inserts a paragraph and allows typing. To see this,
30
+ focus an editor and move your mouse above the focus space you want
31
+ to access. The plugin is enabled by default so no additional
32
+ configuration is necessary.
33
+ </p>
34
+ </div>
35
+ <div>
36
+ <label for="editor1">
37
+ Editor 1:
38
+ </label>
39
+ <div class="description">
40
+ <p>
41
+ This editor uses a default <strong>Magicline</strong> setup.
42
+ </p>
43
+ </div>
44
+ <textarea cols="80" id="editor1" name="editor1" rows="10">
45
+ &lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;width: 100%; &quot;&gt;
46
+ &lt;tbody&gt;
47
+ &lt;tr&gt;
48
+ &lt;td&gt;This table&lt;/td&gt;
49
+ &lt;td&gt;is the&lt;/td&gt;
50
+ &lt;td&gt;very first&lt;/td&gt;
51
+ &lt;td&gt;element of the document.&lt;/td&gt;
52
+ &lt;/tr&gt;
53
+ &lt;tr&gt;
54
+ &lt;td&gt;We are still&lt;/td&gt;
55
+ &lt;td&gt;able to acces&lt;/td&gt;
56
+ &lt;td&gt;the space before it.&lt;/td&gt;
57
+ &lt;td&gt;
58
+ &lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;width: 100%; &quot;&gt;
59
+ &lt;tbody&gt;
60
+ &lt;tr&gt;
61
+ &lt;td&gt;This table is inside of a cell of another table.&lt;/td&gt;
62
+ &lt;/tr&gt;
63
+ &lt;tr&gt;
64
+ &lt;td&gt;We can type&amp;nbsp;either before or after it though.&lt;/td&gt;
65
+ &lt;/tr&gt;
66
+ &lt;/tbody&gt;
67
+ &lt;/table&gt;
68
+ &lt;/td&gt;
69
+ &lt;/tr&gt;
70
+ &lt;/tbody&gt;
71
+ &lt;/table&gt;
72
+
73
+ &lt;p&gt;Two succesive horizontal lines (&lt;tt&gt;HR&lt;/tt&gt; tags). We can access the space in between:&lt;/p&gt;
74
+
75
+ &lt;hr /&gt;
76
+ &lt;hr /&gt;
77
+ &lt;ol&gt;
78
+ &lt;li&gt;This numbered list...&lt;/li&gt;
79
+ &lt;li&gt;...is a neighbour of a horizontal line...&lt;/li&gt;
80
+ &lt;li&gt;...and another list.&lt;/li&gt;
81
+ &lt;/ol&gt;
82
+
83
+ &lt;ul&gt;
84
+ &lt;li&gt;We can type between the lists...&lt;/li&gt;
85
+ &lt;li&gt;...thanks to &lt;strong&gt;Magicline&lt;/strong&gt;.&lt;/li&gt;
86
+ &lt;/ul&gt;
87
+
88
+ &lt;p&gt;Lorem ipsum dolor sit amet dui. Morbi vel turpis. Nullam et leo. Etiam rutrum, urna tellus dui vel tincidunt mattis egestas, justo fringilla vel, massa. Phasellus.&lt;/p&gt;
89
+
90
+ &lt;p&gt;Quisque iaculis, dui lectus varius vitae, tortor. Proin lacus. Pellentesque ac lacus. Aenean nonummy commodo nec, pede. Etiam blandit risus elit.&lt;/p&gt;
91
+
92
+ &lt;p&gt;Ut pretium. Vestibulum rutrum in, adipiscing elit. Sed in quam in purus sem vitae pede. Pellentesque bibendum, urna sem vel risus. Vivamus posuere metus. Aliquam gravida iaculis nisl. Nam enim. Aliquam erat ac lacus tellus ac felis.&lt;/p&gt;
93
+
94
+ &lt;div style=&quot;border: 2px dashed green; background: #ddd; text-align: center;&quot;&gt;
95
+ &lt;p&gt;This text is wrapped in a&amp;nbsp;&lt;tt&gt;DIV&lt;/tt&gt;&amp;nbsp;element. We can type after this element though.&lt;/p&gt;
96
+ &lt;/div&gt;
97
+ </textarea>
98
+ <script>
99
+
100
+ // This call can be placed at any point after the
101
+ // <textarea>, or inside a <head><script> in a
102
+ // window.onload event handler.
103
+
104
+ CKEDITOR.replace( 'editor1', {
105
+ extraPlugins: 'magicline', // Ensure that magicline plugin, which is required for this sample, is loaded.
106
+ allowedContent: true // Switch off the ACF, so very complex content created to
107
+ // show magicline's power isn't filtered.
108
+ } );
109
+
110
+ </script>
111
+ </div>
112
+ <br>
113
+ <div>
114
+ <label for="editor2">
115
+ Editor 2:
116
+ </label>
117
+ <div class="description">
118
+ <p>
119
+ This editor is using a blue line.
120
+ </p>
121
+ <pre class="samples">
122
+ CKEDITOR.replace( 'editor2', {
123
+ magicline_color: 'blue'
124
+ });</pre>
125
+ </div>
126
+ <textarea cols="80" id="editor2" name="editor2" rows="10">
127
+ &lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;width: 100%; &quot;&gt;
128
+ &lt;tbody&gt;
129
+ &lt;tr&gt;
130
+ &lt;td&gt;This table&lt;/td&gt;
131
+ &lt;td&gt;is the&lt;/td&gt;
132
+ &lt;td&gt;very first&lt;/td&gt;
133
+ &lt;td&gt;element of the document.&lt;/td&gt;
134
+ &lt;/tr&gt;
135
+ &lt;tr&gt;
136
+ &lt;td&gt;We are still&lt;/td&gt;
137
+ &lt;td&gt;able to acces&lt;/td&gt;
138
+ &lt;td&gt;the space before it.&lt;/td&gt;
139
+ &lt;td&gt;
140
+ &lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;width: 100%; &quot;&gt;
141
+ &lt;tbody&gt;
142
+ &lt;tr&gt;
143
+ &lt;td&gt;This table is inside of a cell of another table.&lt;/td&gt;
144
+ &lt;/tr&gt;
145
+ &lt;tr&gt;
146
+ &lt;td&gt;We can type&amp;nbsp;either before or after it though.&lt;/td&gt;
147
+ &lt;/tr&gt;
148
+ &lt;/tbody&gt;
149
+ &lt;/table&gt;
150
+ &lt;/td&gt;
151
+ &lt;/tr&gt;
152
+ &lt;/tbody&gt;
153
+ &lt;/table&gt;
154
+
155
+ &lt;p&gt;Two succesive horizontal lines (&lt;tt&gt;HR&lt;/tt&gt; tags). We can access the space in between:&lt;/p&gt;
156
+
157
+ &lt;hr /&gt;
158
+ &lt;hr /&gt;
159
+ &lt;ol&gt;
160
+ &lt;li&gt;This numbered list...&lt;/li&gt;
161
+ &lt;li&gt;...is a neighbour of a horizontal line...&lt;/li&gt;
162
+ &lt;li&gt;...and another list.&lt;/li&gt;
163
+ &lt;/ol&gt;
164
+
165
+ &lt;ul&gt;
166
+ &lt;li&gt;We can type between the lists...&lt;/li&gt;
167
+ &lt;li&gt;...thanks to &lt;strong&gt;Magicline&lt;/strong&gt;.&lt;/li&gt;
168
+ &lt;/ul&gt;
169
+
170
+ &lt;p&gt;Lorem ipsum dolor sit amet dui. Morbi vel turpis. Nullam et leo. Etiam rutrum, urna tellus dui vel tincidunt mattis egestas, justo fringilla vel, massa. Phasellus.&lt;/p&gt;
171
+
172
+ &lt;p&gt;Quisque iaculis, dui lectus varius vitae, tortor. Proin lacus. Pellentesque ac lacus. Aenean nonummy commodo nec, pede. Etiam blandit risus elit.&lt;/p&gt;
173
+
174
+ &lt;p&gt;Ut pretium. Vestibulum rutrum in, adipiscing elit. Sed in quam in purus sem vitae pede. Pellentesque bibendum, urna sem vel risus. Vivamus posuere metus. Aliquam gravida iaculis nisl. Nam enim. Aliquam erat ac lacus tellus ac felis.&lt;/p&gt;
175
+
176
+ &lt;div style=&quot;border: 2px dashed green; background: #ddd; text-align: center;&quot;&gt;
177
+ &lt;p&gt;This text is wrapped in a&amp;nbsp;&lt;tt&gt;DIV&lt;/tt&gt;&amp;nbsp;element. We can type after this element though.&lt;/p&gt;
178
+ &lt;/div&gt;
179
+ </textarea>
180
+ <script>
181
+
182
+ // This call can be placed at any point after the
183
+ // <textarea>, or inside a <head><script> in a
184
+ // window.onload event handler.
185
+
186
+ CKEDITOR.replace( 'editor2', {
187
+ extraPlugins: 'magicline', // Ensure that magicline plugin, which is required for this sample, is loaded.
188
+ magicline_color: 'blue', // Blue line
189
+ allowedContent: true // Switch off the ACF, so very complex content created to
190
+ // show magicline's power isn't filtered.
191
+ });
192
+
193
+ </script>
194
+ </div>
195
+ <div id="footer">
196
+ <hr>
197
+ <p>
198
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
199
+ </p>
200
+ <p id="copy">
201
+ Copyright &copy; 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
202
+ Knabben. All rights reserved.
203
+ </p>
204
+ </div>
205
+ </body>
206
+ </html>
@@ -0,0 +1,232 @@
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>Toolbar Configuration &mdash; CKEditor Sample</title>
9
+ <meta charset="utf-8">
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/sample.css" rel="stylesheet">
15
+ </head>
16
+ <body>
17
+ <h1 class="samples">
18
+ <a href="../../../samples/index.html">CKEditor Samples</a> &raquo; Toolbar Configuration
19
+ </h1>
20
+ <div class="description">
21
+ <p>
22
+ This sample page demonstrates editor with loaded <a href="#fullToolbar">full toolbar</a> (all registered buttons) and, if
23
+ current editor's configuration modifies default settings, also editor with <a href="#currentToolbar">modified toolbar</a>.
24
+ </p>
25
+
26
+ <p>Since CKEditor 4 there are two ways to configure toolbar buttons.</p>
27
+
28
+ <h2 class="samples">By <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbar">config.toolbar</a></h2>
29
+
30
+ <p>
31
+ You can explicitly define which buttons are displayed in which groups and in which order.
32
+ This is the more precise setting, but less flexible. If newly added plugin adds its
33
+ own button you'll have to add it manually to your <code>config.toolbar</code> setting as well.
34
+ </p>
35
+
36
+ <p>To add a CKEditor instance with custom toolbar setting, insert the following JavaScript call to your code:</p>
37
+
38
+ <pre class="samples">
39
+ CKEDITOR.replace( <em>'textarea_id'</em>, {
40
+ <strong>toolbar:</strong> [
41
+ { name: 'document', items: [ 'Source', '-', 'NewPage', 'Preview', '-', 'Templates' ] }, // Defines toolbar group with name (used to create voice label) and items in 3 subgroups.
42
+ [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ], // Defines toolbar group without name.
43
+ '/', // Line break - next group will be placed in new line.
44
+ { name: 'basicstyles', items: [ 'Bold', 'Italic' ] }
45
+ ]
46
+ });</pre>
47
+
48
+ <h2 class="samples">By <a href="http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-toolbarGroups">config.toolbarGroups</a></h2>
49
+
50
+ <p>
51
+ You can define which groups of buttons (like e.g. <code>basicstyles</code>, <code>clipboard</code>
52
+ and <code>forms</code>) are displayed and in which order. Registered buttons are associated
53
+ with toolbar groups by <code>toolbar</code> property in their definition.
54
+ This setting's advantage is that you don't have to modify toolbar configuration
55
+ when adding/removing plugins which register their own buttons.
56
+ </p>
57
+
58
+ <p>To add a CKEditor instance with custom toolbar groups setting, insert the following JavaScript call to your code:</p>
59
+
60
+ <pre class="samples">
61
+ CKEDITOR.replace( <em>'textarea_id'</em>, {
62
+ <strong>toolbarGroups:</strong> [
63
+ { name: 'document', groups: [ 'mode', 'document' ] }, // Displays document group with its two subgroups.
64
+ { name: 'clipboard', groups: [ 'clipboard', 'undo' ] }, // Group's name will be used to create voice label.
65
+ '/', // Line break - next group will be placed in new line.
66
+ { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },
67
+ { name: 'links' }
68
+ ]
69
+
70
+ // NOTE: Remember to leave 'toolbar' property with the default value (null).
71
+ });</pre>
72
+ </div>
73
+
74
+ <div id="currentToolbar" style="display: none">
75
+ <h2 class="samples">Current toolbar configuration</h2>
76
+ <p>Below you can see editor with current toolbar definition.</p>
77
+ <textarea cols="80" id="editorCurrent" name="editorCurrent" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
78
+ <pre id="editorCurrentCfg" class="samples"></pre>
79
+ </div>
80
+
81
+ <div id="fullToolbar">
82
+ <h2 class="samples">Full toolbar configuration</h2>
83
+ <p>Below you can see editor with full toolbar, generated automatically by the editor.</p>
84
+ <p>
85
+ <strong>Note</strong>: To create editor instance with full toolbar you don't have to set anything.
86
+ Just leave <code>toolbar</code> and <code>toolbarGroups</code> with the default, <code>null</code> values.
87
+ </p>
88
+ <textarea cols="80" id="editorFull" name="editorFull" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
89
+ <pre id="editorFullCfg" class="samples"></pre>
90
+ </div>
91
+
92
+ <script>
93
+
94
+ (function() {
95
+ 'use strict';
96
+
97
+ var buttonsNames;
98
+
99
+ CKEDITOR.config.extraPlugins = 'toolbar';
100
+
101
+ CKEDITOR.on( 'instanceReady', function( evt ) {
102
+ var editor = evt.editor,
103
+ editorCurrent = editor.name == 'editorCurrent',
104
+ defaultToolbar = !( editor.config.toolbar || editor.config.toolbarGroups || editor.config.removeButtons ),
105
+ pre = CKEDITOR.document.getById( editor.name + 'Cfg' ),
106
+ output = '';
107
+
108
+ if ( editorCurrent ) {
109
+ // If default toolbar configuration has been modified, show "current toolbar" section.
110
+ if ( !defaultToolbar )
111
+ CKEDITOR.document.getById( 'currentToolbar' ).show();
112
+ else
113
+ return;
114
+ }
115
+
116
+ if ( !buttonsNames )
117
+ buttonsNames = createButtonsNamesHash( editor.ui.items );
118
+
119
+ // Toolbar isn't set explicitly, so it was created automatically from toolbarGroups.
120
+ if ( !editor.config.toolbar ) {
121
+ output +=
122
+ '// Toolbar configuration generated automatically by the editor based on config.toolbarGroups.\n' +
123
+ dumpToolbarConfiguration( editor ) +
124
+ '\n\n' +
125
+ '// Toolbar groups configuration.\n' +
126
+ dumpToolbarConfiguration( editor, true )
127
+ }
128
+ // Toolbar groups doesn't count in this case - print only toolbar.
129
+ else {
130
+ output += '// Toolbar configuration.\n' +
131
+ dumpToolbarConfiguration( editor );
132
+ }
133
+
134
+ // Recreate to avoid old IE from loosing whitespaces on filling <pre> content.
135
+ var preOutput = pre.getOuterHtml().replace( /(?=<\/)/, output );
136
+ CKEDITOR.dom.element.createFromHtml( preOutput ).replace( pre );
137
+ } );
138
+
139
+ CKEDITOR.replace( 'editorCurrent', { height: 100 } );
140
+ CKEDITOR.replace( 'editorFull', {
141
+ // Reset toolbar settings, so full toolbar will be generated automatically.
142
+ toolbar: null,
143
+ toolbarGroups: null,
144
+ removeButtons: null,
145
+ height: 100
146
+ } );
147
+
148
+ function dumpToolbarConfiguration( editor, printGroups ) {
149
+ var output = [],
150
+ toolbar = editor.toolbar;
151
+
152
+ for ( var i = 0; i < toolbar.length; ++i ) {
153
+ var group = dumpToolbarGroup( toolbar[ i ], printGroups );
154
+ if ( group )
155
+ output.push( group );
156
+ }
157
+
158
+ return 'config.toolbar' + ( printGroups ? 'Groups' : '' ) + ' = [\n\t' + output.join( ',\n\t' ) + '\n];';
159
+ }
160
+
161
+ function dumpToolbarGroup( group, printGroups ) {
162
+ var output = [];
163
+
164
+ if ( typeof group == 'string' )
165
+ return '\'' + group + '\'';
166
+ if ( CKEDITOR.tools.isArray( group ) )
167
+ return dumpToolbarItems( group );
168
+ // Skip group when printing entire toolbar configuration and there are no items in this group.
169
+ if ( !printGroups && !group.items )
170
+ return;
171
+
172
+ if ( group.name )
173
+ output.push( 'name: \'' + group.name + '\'' );
174
+
175
+ if ( group.groups )
176
+ output.push( 'groups: ' + dumpToolbarItems( group.groups ) );
177
+
178
+ if ( !printGroups )
179
+ output.push( 'items: ' + dumpToolbarItems( group.items ) );
180
+
181
+ return '{ ' + output.join( ', ' ) + ' }';
182
+ }
183
+
184
+ function dumpToolbarItems( items ) {
185
+ if ( typeof items == 'string' )
186
+ return '\'' + items + '\'';
187
+
188
+ var names = [],
189
+ i, item;
190
+
191
+ for ( var i = 0; i < items.length; ++i ) {
192
+ item = items[ i ];
193
+ if ( typeof item == 'string' )
194
+ names.push( item );
195
+ else {
196
+ if ( item.type == CKEDITOR.UI_SEPARATOR )
197
+ names.push( '-' );
198
+ else
199
+ names.push( buttonsNames[ item.name ] );
200
+ }
201
+ }
202
+
203
+ return '[ \'' + names.join( '\', \'' ) + '\' ]';
204
+ }
205
+
206
+ // Creates { 'lowercased': 'LowerCased' } buttons names hash.
207
+ function createButtonsNamesHash( items ) {
208
+ var hash = {},
209
+ name;
210
+
211
+ for ( name in items ) {
212
+ hash[ items[ name ].name ] = name;
213
+ }
214
+
215
+ return hash;
216
+ }
217
+
218
+ })();
219
+ </script>
220
+
221
+ <div id="footer">
222
+ <hr>
223
+ <p>
224
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
225
+ </p>
226
+ <p id="copy">
227
+ Copyright &copy; 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
228
+ Knabben. All rights reserved.
229
+ </p>
230
+ </div>
231
+ </body>
232
+ </html>
@@ -0,0 +1,77 @@
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>Full Page Editing &mdash; CKEditor Sample</title>
9
+ <meta charset="utf-8">
10
+ <script src="../../../ckeditor.js"></script>
11
+ <script src="../../../samples/sample.js"></script>
12
+ <link rel="stylesheet" href="../../../samples/sample.css">
13
+ <meta name="ckeditor-sample-required-plugins" content="sourcearea">
14
+ <meta name="ckeditor-sample-name" content="Full page support">
15
+ <meta name="ckeditor-sample-group" content="Plugins">
16
+ <meta name="ckeditor-sample-description" content="CKEditor inserted with a JavaScript call and used to edit the whole page from &lt;html&gt; to &lt;/html&gt;.">
17
+ </head>
18
+ <body>
19
+ <h1 class="samples">
20
+ <a href="../../../samples/index.html">CKEditor Samples</a> &raquo; Full Page Editing
21
+ </h1>
22
+ <div class="description">
23
+ <p>
24
+ This sample shows how to configure CKEditor to edit entire HTML pages, from the
25
+ <code>&lt;html&gt;</code> tag to the <code>&lt;/html&gt;</code> tag.
26
+ </p>
27
+ <p>
28
+ The CKEditor instance below is inserted with a JavaScript call using the following code:
29
+ </p>
30
+ <pre class="samples">
31
+ CKEDITOR.replace( '<em>textarea_id</em>', {
32
+ <strong>fullPage: true</strong>,
33
+ <strong>allowedContent: true</strong>
34
+ });
35
+ </pre>
36
+ <p>
37
+ Note that <code><em>textarea_id</em></code> in the code above is the <code>id</code> attribute of
38
+ the <code>&lt;textarea&gt;</code> element to be replaced.
39
+ </p>
40
+ <p>
41
+ The <code><em>allowedContent</em></code> in the code above is set to <code>true</code> to disable content filtering.
42
+ 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.
43
+ </p>
44
+ </div>
45
+ <form action="../../../samples/sample_posteddata.php" method="post">
46
+ <label for="editor1">
47
+ CKEditor output the entire page including content outside of
48
+ <code>&lt;body&gt;</code> element, so content like meta and title can be changed:
49
+ </label>
50
+ <textarea cols="80" id="editor1" name="editor1" rows="10">
51
+ &lt;h1&gt;&lt;img alt=&quot;Saturn V carrying Apollo 11&quot; align=&quot;right&quot; src=&quot;../../../samples/assets/sample.jpg&quot;/&gt; Apollo 11&lt;/h1&gt; &lt;p&gt;&lt;b&gt;Apollo 11&lt;/b&gt; was the spaceflight that landed the first humans, Americans &lt;a href=&quot;http://en.wikipedia.org/wiki/Neil_Armstrong&quot; title=&quot;Neil Armstrong&quot;&gt;Neil Armstrong&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Buzz_Aldrin&quot; title=&quot;Buzz Aldrin&quot;&gt;Buzz Aldrin&lt;/a&gt;, on the Moon on July 20, 1969, at 20:18 UTC. Armstrong became the first to step onto the lunar surface 6 hours later on July 21 at 02:56 UTC.&lt;/p&gt; &lt;p&gt;Armstrong spent about &lt;s&gt;three and a half&lt;/s&gt; two and a half hours outside the spacecraft, Aldrin slightly less; and together they collected 47.5 pounds (21.5&amp;nbsp;kg) of lunar material for return to Earth. A third member of the mission, &lt;a href=&quot;http://en.wikipedia.org/wiki/Michael_Collins_(astronaut)&quot; title=&quot;Michael Collins (astronaut)&quot;&gt;Michael Collins&lt;/a&gt;, piloted the &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_Command/Service_Module&quot; title=&quot;Apollo Command/Service Module&quot;&gt;command&lt;/a&gt; spacecraft alone in lunar orbit until Armstrong and Aldrin returned to it for the trip back to Earth.&lt;/p&gt; &lt;h2&gt;Broadcasting and &lt;em&gt;quotes&lt;/em&gt; &lt;a id=&quot;quotes&quot; name=&quot;quotes&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;Broadcast on live TV to a world-wide audience, Armstrong stepped onto the lunar surface and described the event as:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;One small step for [a] man, one giant leap for mankind.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Apollo 11 effectively ended the &lt;a href=&quot;http://en.wikipedia.org/wiki/Space_Race&quot; title=&quot;Space Race&quot;&gt;Space Race&lt;/a&gt; and fulfilled a national goal proposed in 1961 by the late U.S. President &lt;a href=&quot;http://en.wikipedia.org/wiki/John_F._Kennedy&quot; title=&quot;John F. Kennedy&quot;&gt;John F. Kennedy&lt;/a&gt; in a speech before the United States Congress:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;[...] before this decade is out, of landing a man on the Moon and returning him safely to the Earth.&lt;/p&gt;&lt;/blockquote&gt; &lt;h2&gt;Technical details &lt;a id=&quot;tech-details&quot; name=&quot;tech-details&quot;&gt;&lt;/a&gt;&lt;/h2&gt; &lt;table align=&quot;right&quot; border=&quot;1&quot; bordercolor=&quot;#ccc&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot; style=&quot;border-collapse:collapse;margin:10px 0 10px 15px;&quot;&gt; &lt;caption&gt;&lt;strong&gt;Mission crew&lt;/strong&gt;&lt;/caption&gt; &lt;thead&gt; &lt;tr&gt; &lt;th scope=&quot;col&quot;&gt;Position&lt;/th&gt; &lt;th scope=&quot;col&quot;&gt;Astronaut&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;Commander&lt;/td&gt; &lt;td&gt;Neil A. Armstrong&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Command Module Pilot&lt;/td&gt; &lt;td&gt;Michael Collins&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;Lunar Module Pilot&lt;/td&gt; &lt;td&gt;Edwin &amp;quot;Buzz&amp;quot; E. Aldrin, Jr.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;p&gt;Launched by a &lt;strong&gt;Saturn V&lt;/strong&gt; rocket from &lt;a href=&quot;http://en.wikipedia.org/wiki/Kennedy_Space_Center&quot; title=&quot;Kennedy Space Center&quot;&gt;Kennedy Space Center&lt;/a&gt; in Merritt Island, Florida on July 16, Apollo 11 was the fifth manned mission of &lt;a href=&quot;http://en.wikipedia.org/wiki/NASA&quot; title=&quot;NASA&quot;&gt;NASA&lt;/a&gt;&amp;#39;s Apollo program. The Apollo spacecraft had three parts:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Command Module&lt;/strong&gt; with a cabin for the three astronauts which was the only part which landed back on Earth&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Service Module&lt;/strong&gt; which supported the Command Module with propulsion, electrical power, oxygen and water&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Lunar Module&lt;/strong&gt; for landing on the Moon.&lt;/li&gt; &lt;/ol&gt; &lt;p&gt;After being sent to the Moon by the Saturn V&amp;#39;s upper stage, the astronauts separated the spacecraft from it and travelled for three days until they entered into lunar orbit. Armstrong and Aldrin then moved into the Lunar Module and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Mare_Tranquillitatis&quot; title=&quot;Mare Tranquillitatis&quot;&gt;Sea of Tranquility&lt;/a&gt;. They stayed a total of about 21 and a half hours on the lunar surface. After lifting off in the upper part of the Lunar Module and rejoining Collins in the Command Module, they returned to Earth and landed in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Pacific_Ocean&quot; title=&quot;Pacific Ocean&quot;&gt;Pacific Ocean&lt;/a&gt; on July 24.&lt;/p&gt; &lt;hr/&gt; &lt;p style=&quot;text-align: right;&quot;&gt;&lt;small&gt;Source: &lt;a href=&quot;http://en.wikipedia.org/wiki/Apollo_11&quot;&gt;Wikipedia.org&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;
52
+ </textarea>
53
+ <script>
54
+
55
+ CKEDITOR.replace( 'editor1', {
56
+ fullPage: true,
57
+ allowedContent: true,
58
+ extraPlugins: 'wysiwygarea'
59
+ });
60
+
61
+ </script>
62
+ <p>
63
+ <input type="submit" value="Submit">
64
+ </p>
65
+ </form>
66
+ <div id="footer">
67
+ <hr>
68
+ <p>
69
+ CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
70
+ </p>
71
+ <p id="copy">
72
+ Copyright &copy; 2003-2013, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
73
+ Knabben. All rights reserved.
74
+ </p>
75
+ </div>
76
+ </body>
77
+ </html>