You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.2 KiB

  1. <!DOCTYPE html>
  2. <!--
  3. Copyright (c) 2003-2014, 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>TAB Key-Based Navigation &mdash; CKEditor Sample</title>
  10. <script src="../ckeditor.js"></script>
  11. <link href="sample.css" rel="stylesheet">
  12. <style>
  13. .cke_focused,
  14. .cke_editable.cke_focused
  15. {
  16. outline: 3px dotted blue !important;
  17. *border: 3px dotted blue !important; /* For IE7 */
  18. }
  19. </style>
  20. <script>
  21. CKEDITOR.on( 'instanceReady', function( evt ) {
  22. var editor = evt.editor;
  23. editor.setData( 'This editor has it\'s tabIndex set to <strong>' + editor.tabIndex + '</strong>' );
  24. // Apply focus class name.
  25. editor.on( 'focus', function() {
  26. editor.container.addClass( 'cke_focused' );
  27. });
  28. editor.on( 'blur', function() {
  29. editor.container.removeClass( 'cke_focused' );
  30. });
  31. // Put startup focus on the first editor in tab order.
  32. if ( editor.tabIndex == 1 )
  33. editor.focus();
  34. });
  35. </script>
  36. </head>
  37. <body>
  38. <h1 class="samples">
  39. <a href="index.html">CKEditor Samples</a> &raquo; TAB Key-Based Navigation
  40. </h1>
  41. <div class="description">
  42. <p>
  43. This sample shows how tab key navigation among editor instances is
  44. affected by the <code>tabIndex</code> attribute from
  45. the original page element. Use TAB key to move between the editors.
  46. </p>
  47. </div>
  48. <p>
  49. <textarea class="ckeditor" cols="80" id="editor4" rows="10" tabindex="1"></textarea>
  50. </p>
  51. <div class="ckeditor" contenteditable="true" id="editor1" tabindex="4"></div>
  52. <p>
  53. <textarea class="ckeditor" cols="80" id="editor2" rows="10" tabindex="2"></textarea>
  54. </p>
  55. <p>
  56. <textarea class="ckeditor" cols="80" id="editor3" rows="10" tabindex="3"></textarea>
  57. </p>
  58. <div id="footer">
  59. <hr>
  60. <p>
  61. CKEditor - The text editor for the Internet - <a class="samples" href="http://ckeditor.com/">http://ckeditor.com</a>
  62. </p>
  63. <p id="copy">
  64. Copyright &copy; 2003-2014, <a class="samples" href="http://cksource.com/">CKSource</a> - Frederico
  65. Knabben. All rights reserved.
  66. </p>
  67. </div>
  68. </body>
  69. </html>