-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAccept Plug-in Test.html
39 lines (37 loc) · 1.17 KB
/
Accept Plug-in Test.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
<!DOCTYPE html>
<html>
<head>
<title>Test ABTextBox Accept Plug-in</title>
<link rel="stylesheet" href="abtextbox.css" />
<script src="abtextbox.js"></script>
<script>
window.onload = function () {
editor = ABTextBox('editor1', {
accept: {
words: [/^.*@.*\.com$/i],
style: {
'font-style': 'italic',
'background-color': 'yellowgreen',
'text-align': 'center'
}
}
});
editor.focus();
editor.style({
'font-family': 'Calibri',
width: '200px',
height: '23px'
});
editor.on('accept', function(event){
editor.readonly(true);
editor.blur();
});
editor.skin('default');
}
</script>
</head>
<body>
<div style="font-family:Calibri; margin-bottom: 10px;">Please enter your email address: </div>
<input type="text" id="editor1" />
</body>
</html>