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.

74 lines
2.5 KiB

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