sharedspace.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <!DOCTYPE html>
  2. <!--
  3. Copyright (c) 2003-2012, 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>Shared-Space 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="Shared-Space plugin">
  13. <meta name="ckeditor-sample-group" content="Plugins">
  14. <meta name="ckeditor-sample-description" content="Having the toolbar and the bottom bar spaces shared by different editor instances.">
  15. </head>
  16. <body>
  17. <h1 class="samples">
  18. <a href="../../../samples/old/index.html">CKEditor Samples</a> &raquo; Sharing Toolbar and Bottom-bar Spaces
  19. </h1>
  20. <div class="warning deprecated">
  21. This sample is not maintained anymore. Check out its <a href="http://sdk.ckeditor.com/samples/sharedspace.html">brand new version in CKEditor SDK</a>.
  22. </div>
  23. <div class="description">
  24. <p>
  25. This sample shows several editor instances that share the very same spaces for both the toolbar and the bottom bar.
  26. </p>
  27. </div>
  28. <div id="top">
  29. <!-- This div will handle all toolbars -->
  30. </div>
  31. <div style="height: 300px; overflow: auto; border: 1px solid #afafaf; padding: 20px; margin: 20px;">
  32. <div id="framed1" style="width: 49%; float: left; margin-bottom: 20px;"></div>
  33. <div id="framed2" style="width: 49%; float: right; margin-bottom: 20px;"></div>
  34. <hr style="clear: both; margin: 20px 0;">
  35. <div contenteditable="true" id="inline1" style="width: 49%; float: left;">
  36. <h3>
  37. Integer condimentum sit amet
  38. </h3>
  39. <p>
  40. <strong>Aenean nonummy a, mattis varius. Cras aliquet.</strong>
  41. Praesent <a href="http://ckeditor.com/">magna non mattis ac, rhoncus nunc</a>, rhoncus eget, cursus pulvinar mollis.</p>
  42. <p>Proin id nibh. Sed eu libero posuere sed, lectus. Phasellus dui gravida gravida feugiat mattis ac, felis.</p>
  43. <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>
  44. </div>
  45. <div contenteditable="true" id="inline2" style="width: 49%; float: right;">
  46. <h3>
  47. Praesent wisi accumsan sit amet nibh
  48. </h3>
  49. <p>Donec ullamcorper, risus tortor, pretium porttitor. Morbi quam quis lectus non leo.</p>
  50. <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>
  51. <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>
  52. </div>
  53. </div>
  54. <div id="bottom">
  55. <!-- This div will handle all toolbars -->
  56. </div>
  57. <script>
  58. // Turn off automatic editor creation first.
  59. CKEDITOR.disableAutoInline = true;
  60. CKEDITOR.inline( 'inline1', {
  61. extraPlugins: 'sharedspace',
  62. removePlugins: 'floatingspace,resize',
  63. sharedSpaces: {
  64. top: 'top',
  65. bottom: 'bottom'
  66. }
  67. });
  68. CKEDITOR.inline( 'inline2', {
  69. extraPlugins: 'sharedspace',
  70. removePlugins: 'floatingspace,resize',
  71. sharedSpaces: {
  72. top: 'top',
  73. bottom: 'bottom'
  74. }
  75. });
  76. CKEDITOR.appendTo( 'framed1', {
  77. extraPlugins: 'sharedspace',
  78. removePlugins: 'maximize,resize',
  79. sharedSpaces: {
  80. top: 'top',
  81. bottom: 'bottom'
  82. }
  83. },
  84. document.getElementById( 'inline1' ).innerHTML
  85. );
  86. CKEDITOR.appendTo( 'framed2', {
  87. extraPlugins: 'sharedspace',
  88. removePlugins: 'maximize,resize',
  89. sharedSpaces: {
  90. top: 'top',
  91. bottom: 'bottom'
  92. }
  93. },
  94. document.getElementById( 'inline2' ).innerHTML
  95. );
  96. </script>
  97. <div id="footer">
  98. <hr>
  99. <p>
  100. CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
  101. </p>
  102. <p id="copy">
  103. Copyright &copy; 2003-2012, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
  104. Knabben. All rights reserved.
  105. </p>
  106. </div>
  107. </body>
  108. </html>