magicline.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <!DOCTYPE html>
  2. <!--
  3. Copyright (c) 2003-2016, 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 &mdash; CKEditor Sample</title>
  10. <script src="../../../ckeditor.js"></script>
  11. <link rel="stylesheet" href="../../../samples/old/sample.css">
  12. <meta name="ckeditor-sample-name" content="Magicline plugin">
  13. <meta name="ckeditor-sample-group" content="Plugins">
  14. <meta name="ckeditor-sample-description" content="Using the Magicline plugin to access difficult focus spaces.">
  15. </head>
  16. <body>
  17. <h1 class="samples">
  18. <a href="../../../samples/old/index.html">CKEditor Samples</a> &raquo; Using Magicline plugin
  19. </h1>
  20. <div class="warning deprecated">
  21. This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/magicline.html">brand new version in CKEditor SDK</a>.
  22. </div>
  23. <div class="description">
  24. <p>
  25. This sample shows the advantages of <strong>Magicline</strong> plugin
  26. which is to enhance the editing process. Thanks to this plugin,
  27. a number of difficult focus spaces which are inaccessible due to
  28. browser issues can now be focused.
  29. </p>
  30. <p>
  31. <strong>Magicline</strong> plugin shows a red line with a handler
  32. which, when clicked, inserts a paragraph and allows typing. To see this,
  33. focus an editor and move your mouse above the focus space you want
  34. to access. The plugin is enabled by default so no additional
  35. configuration is necessary.
  36. </p>
  37. </div>
  38. <div>
  39. <label for="editor1">
  40. Editor 1:
  41. </label>
  42. <div class="description">
  43. <p>
  44. This editor uses a default <strong>Magicline</strong> setup.
  45. </p>
  46. </div>
  47. <textarea cols="80" id="editor1" name="editor1" rows="10">
  48. &lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;width: 100%; &quot;&gt;
  49. &lt;tbody&gt;
  50. &lt;tr&gt;
  51. &lt;td&gt;This table&lt;/td&gt;
  52. &lt;td&gt;is the&lt;/td&gt;
  53. &lt;td&gt;very first&lt;/td&gt;
  54. &lt;td&gt;element of the document.&lt;/td&gt;
  55. &lt;/tr&gt;
  56. &lt;tr&gt;
  57. &lt;td&gt;We are still&lt;/td&gt;
  58. &lt;td&gt;able to acces&lt;/td&gt;
  59. &lt;td&gt;the space before it.&lt;/td&gt;
  60. &lt;td&gt;
  61. &lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;width: 100%; &quot;&gt;
  62. &lt;tbody&gt;
  63. &lt;tr&gt;
  64. &lt;td&gt;This table is inside of a cell of another table.&lt;/td&gt;
  65. &lt;/tr&gt;
  66. &lt;tr&gt;
  67. &lt;td&gt;We can type&amp;nbsp;either before or after it though.&lt;/td&gt;
  68. &lt;/tr&gt;
  69. &lt;/tbody&gt;
  70. &lt;/table&gt;
  71. &lt;/td&gt;
  72. &lt;/tr&gt;
  73. &lt;/tbody&gt;
  74. &lt;/table&gt;
  75. &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;
  76. &lt;hr /&gt;
  77. &lt;hr /&gt;
  78. &lt;ol&gt;
  79. &lt;li&gt;This numbered list...&lt;/li&gt;
  80. &lt;li&gt;...is a neighbour of a horizontal line...&lt;/li&gt;
  81. &lt;li&gt;...and another list.&lt;/li&gt;
  82. &lt;/ol&gt;
  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. &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;
  88. &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;
  89. &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;
  90. &lt;div style=&quot;border: 2px dashed green; background: #ddd; text-align: center;&quot;&gt;
  91. &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;
  92. &lt;/div&gt;
  93. </textarea>
  94. <script>
  95. // This call can be placed at any point after the
  96. // <textarea>, or inside a <head><script> in a
  97. // window.onload event handler.
  98. CKEDITOR.replace( 'editor1', {
  99. extraPlugins: 'magicline', // Ensure that magicline plugin, which is required for this sample, is loaded.
  100. allowedContent: true // Switch off the ACF, so very complex content created to
  101. // show magicline's power isn't filtered.
  102. } );
  103. </script>
  104. </div>
  105. <br>
  106. <div>
  107. <label for="editor2">
  108. Editor 2:
  109. </label>
  110. <div class="description">
  111. <p>
  112. This editor is using a blue line.
  113. </p>
  114. <pre class="samples">
  115. CKEDITOR.replace( 'editor2', {
  116. magicline_color: 'blue'
  117. });</pre>
  118. </div>
  119. <textarea cols="80" id="editor2" name="editor2" rows="10">
  120. &lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;width: 100%; &quot;&gt;
  121. &lt;tbody&gt;
  122. &lt;tr&gt;
  123. &lt;td&gt;This table&lt;/td&gt;
  124. &lt;td&gt;is the&lt;/td&gt;
  125. &lt;td&gt;very first&lt;/td&gt;
  126. &lt;td&gt;element of the document.&lt;/td&gt;
  127. &lt;/tr&gt;
  128. &lt;tr&gt;
  129. &lt;td&gt;We are still&lt;/td&gt;
  130. &lt;td&gt;able to acces&lt;/td&gt;
  131. &lt;td&gt;the space before it.&lt;/td&gt;
  132. &lt;td&gt;
  133. &lt;table border=&quot;1&quot; cellpadding=&quot;1&quot; cellspacing=&quot;1&quot; style=&quot;width: 100%; &quot;&gt;
  134. &lt;tbody&gt;
  135. &lt;tr&gt;
  136. &lt;td&gt;This table is inside of a cell of another table.&lt;/td&gt;
  137. &lt;/tr&gt;
  138. &lt;tr&gt;
  139. &lt;td&gt;We can type&amp;nbsp;either before or after it though.&lt;/td&gt;
  140. &lt;/tr&gt;
  141. &lt;/tbody&gt;
  142. &lt;/table&gt;
  143. &lt;/td&gt;
  144. &lt;/tr&gt;
  145. &lt;/tbody&gt;
  146. &lt;/table&gt;
  147. &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;
  148. &lt;hr /&gt;
  149. &lt;hr /&gt;
  150. &lt;ol&gt;
  151. &lt;li&gt;This numbered list...&lt;/li&gt;
  152. &lt;li&gt;...is a neighbour of a horizontal line...&lt;/li&gt;
  153. &lt;li&gt;...and another list.&lt;/li&gt;
  154. &lt;/ol&gt;
  155. &lt;ul&gt;
  156. &lt;li&gt;We can type between the lists...&lt;/li&gt;
  157. &lt;li&gt;...thanks to &lt;strong&gt;Magicline&lt;/strong&gt;.&lt;/li&gt;
  158. &lt;/ul&gt;
  159. &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;
  160. &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;
  161. &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;
  162. &lt;div style=&quot;border: 2px dashed green; background: #ddd; text-align: center;&quot;&gt;
  163. &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;
  164. &lt;/div&gt;
  165. </textarea>
  166. <script>
  167. // This call can be placed at any point after the
  168. // <textarea>, or inside a <head><script> in a
  169. // window.onload event handler.
  170. CKEDITOR.replace( 'editor2', {
  171. extraPlugins: 'magicline', // Ensure that magicline plugin, which is required for this sample, is loaded.
  172. magicline_color: 'blue', // Blue line
  173. allowedContent: true // Switch off the ACF, so very complex content created to
  174. // show magicline's power isn't filtered.
  175. });
  176. </script>
  177. </div>
  178. <div id="footer">
  179. <hr>
  180. <p>
  181. CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
  182. </p>
  183. <p id="copy">
  184. Copyright &copy; 2003-2016, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
  185. Knabben. All rights reserved.
  186. </p>
  187. </div>
  188. </body>
  189. </html>