1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
---|
5 | <title>Simple example of Xinha</title> |
---|
6 | <script type="text/javascript"> |
---|
7 | var _editor_url = document.location.href.replace(/examples\/simple_example\.html.*/, '') |
---|
8 | |
---|
9 | var _editor_lang = "en"; |
---|
10 | </script> |
---|
11 | <!-- Load up the actual editor core --> |
---|
12 | <script type="text/javascript" src="../XinhaCore.js"></script> |
---|
13 | <script type="text/javascript"> |
---|
14 | |
---|
15 | var xinha_plugins = |
---|
16 | [ |
---|
17 | 'Linker' |
---|
18 | ]; |
---|
19 | var xinha_editors = |
---|
20 | [ |
---|
21 | 'myTextArea', |
---|
22 | 'anotherOne' |
---|
23 | ]; |
---|
24 | |
---|
25 | function xinha_init() |
---|
26 | { |
---|
27 | if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return; |
---|
28 | |
---|
29 | var xinha_config = new Xinha.Config(); |
---|
30 | |
---|
31 | xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins); |
---|
32 | |
---|
33 | Xinha.startEditors(xinha_editors); |
---|
34 | } |
---|
35 | Xinha.addOnloadHandler(xinha_init); |
---|
36 | </script> |
---|
37 | |
---|
38 | </head> |
---|
39 | |
---|
40 | <body> |
---|
41 | |
---|
42 | <form onsubmit="alert(this.myTextArea.value); return false;"> |
---|
43 | <textarea id="myTextArea" name="myTextArea" rows="25" cols="80"> |
---|
44 | <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. |
---|
45 | Aliquam et tellus vitae justo varius placerat. Suspendisse iaculis |
---|
46 | velit semper dolor. Donec gravida tincidunt mi. Curabitur tristique |
---|
47 | ante elementum turpis. Aliquam nisl. Nulla posuere neque non |
---|
48 | tellus. Morbi vel nibh. Cum sociis natoque penatibus et magnis dis |
---|
49 | parturient montes, nascetur ridiculus mus. Nam nec wisi. In wisi. |
---|
50 | Curabitur pharetra bibendum lectus.</p> |
---|
51 | </textarea> |
---|
52 | </form> |
---|
53 | </body> |
---|
54 | </html> |
---|