magicline.html 8.2 KB

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