forked from ckeditor/ckeditor4
-
Notifications
You must be signed in to change notification settings - Fork 2
/
tabindex.html
88 lines (81 loc) · 3.04 KB
/
tabindex.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!DOCTYPE html>
<!--
Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
CKEditor 4 LTS ("Long Term Support") is available under the terms of the Extended Support Model.
-->
<html lang="en">
<head>
<meta charset="utf-8">
<title>TAB Key-Based Navigation — CKEditor Sample</title>
<script src="../../ckeditor.js"></script>
<link href="sample.css" rel="stylesheet">
<meta name="description" content="Try the latest sample of CKEditor 4 and learn more about customizing your WYSIWYG editor with endless possibilities.">
<style>
.cke_focused,
.cke_editable.cke_focused
{
outline: 3px dotted blue !important;
*border: 3px dotted blue !important; /* For IE7 */
}
</style>
<script>
CKEDITOR.on( 'instanceReady', function( evt ) {
var editor = evt.editor;
editor.setData( 'This editor has it\'s tabIndex set to <strong>' + editor.tabIndex + '</strong>' );
// Apply focus class name.
editor.on( 'focus', function() {
editor.container.addClass( 'cke_focused' );
} );
editor.on( 'blur', function() {
editor.container.removeClass( 'cke_focused' );
} );
// Put startup focus on the first editor in tab order.
if ( editor.tabIndex == 1 )
editor.focus();
editor.on( 'contentPreview', function( evt ) {
evt.data.dataValue = '<div style="padding: 1.5em;border: 3px #f00 solid">' +
'<h1>Content Preview was blocked</h1>' +
'<p>To ensure the highest security, the content preview in samples was blocked.</p>' +
'<p>Please refer to our ' +
'<a href="https://ckeditor.com/docs/ckeditor4/latest/guide/dev_best_practices.html#validate-preview-content">' +
'best practices on security</a> to learn more how to properly configure and secure the content preview.</p>' +
'</div>';
} );
} );
</script>
</head>
<body>
<h1 class="samples">
<a href="index.html">CKEditor Samples</a> » TAB Key-Based Navigation
</h1>
<div class="warning deprecated">
This sample is not maintained anymore. Check out its <a href="https://ckeditor.com/docs/ckeditor4/latest/examples/tabindex.html">brand new version in CKEditor Examples</a>.
</div>
<div class="description">
<p>
This sample shows how tab key navigation among editor instances is
affected by the <code>tabIndex</code> attribute from
the original page element. Use TAB key to move between the editors.
</p>
</div>
<p>
<textarea class="ckeditor" cols="80" id="editor4" rows="10" tabindex="1"></textarea>
</p>
<div class="ckeditor" contenteditable="true" id="editor1" tabindex="4"></div>
<p>
<textarea class="ckeditor" cols="80" id="editor2" rows="10" tabindex="2"></textarea>
</p>
<p>
<textarea class="ckeditor" cols="80" id="editor3" rows="10" tabindex="3"></textarea>
</p>
<div id="footer">
<hr>
<p>
CKEditor - The text editor for the Internet - <a class="samples" href="https://ckeditor.com/">https://ckeditor.com</a>
</p>
<p id="copy">
Copyright © 2003-2024, <a class="samples" href="https://cksource.com/">CKSource</a> Holding sp. z o.o. All rights reserved.
</p>
</div>
</body>
</html>