forked from alotaiba/Auto-Input-Text-Direction
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
124 lines (118 loc) · 2.32 KB
/
index.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="eb" dir="ltr">
<head>
<style type="text/css">
#wrapper
{
text-align:left;
margin:0 auto;
width:600px;
}
body
{
padding:0;
border:0;
margin:0;
font-family: Tahoma, sans-serif;
color:black;
}
a
{
color:blue;
text-decoration:underline;
}
a:link,
a:visited
{
color:#333;
text-decoration:underline;
}
p a:active
{
color:#000;
}
a:hover
{
color:#000;
text-decoration:none;
}
code
{
font-family:'andale mono','lucida console','courier new',monospace;
font-size:1em;
}
p
{
line-height:1.6;
font-size:0.8em;
text-align:left;
margin:0 0 1em 0;
}
h1,h2,h3,h4,h5
{
font-family:Arial, sans-serif;
font-weight:bold;
margin: 0.5em 0;
}
h1
{
color:#000;
font-size:2em;
}
h2
{
color:#333;
font-size:1.2em;
}
h3
{
color:#333;
font-size:1.0em;
}
h4
{
color:#333;
font-size:0.8em;
}
input, textarea
{
font-family: Tahoma, Arial, sans-serif;
font-size:1.2em;
margin:0;
border:1px solid #c3c3c3;
color:#333;
}
form
{
text-align:left;
background:#EFEFEF;
border:3px solid #ccc;
padding:0.5em;
margin:0 0 1em 0;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Example of auto input text direction detection on forms</title>
<script type="text/javascript" src="../auto-input-text-direction.js"></script>
</head>
<body>
<div id="wrapper">
<h1>Example of auto input text direction detection on forms</h1>
<p>You can test by entering an Arabic text, in the form below, and you'll notice that the direction will change automatically, to allow you to enter the text from right to left.</p>
<form action="">
<div>
<h3>Testing text input element</h3>
<p>
<input type="text" size="40" id="rtl-txt-input" onkeyup="detectDirection(this);" />
</p>
<h3>Testing textarea element</h3>
<p>
<textarea id="rtl-textarea" cols="48" rows="6" onkeyup="detectDirection(this);"></textarea>
</p>
</div>
</form>
<h4>For more information, please read <a href="http://www.almashroo.com/1810/%D8%AA%D8%AD%D9%88%D9%8A%D9%84-%D8%A7%D8%AA%D8%AC%D8%A7%D9%87-%D8%A7%D9%84%D9%86%D8%B5-%D8%AA%D9%84%D9%82%D8%A7%D8%A6%D9%8A%D8%A7-%D8%AD%D8%B3%D8%A8-%D8%A7%D9%84%D9%84%D8%BA%D8%A9/">the article</a> (Arabic).</h4>
</div>
</body>
</html>