corrade-nucleus-nucleons – Blame information for rev 20
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
20 | office | 1 | <!doctype html> |
2 | <html lang="en-US"> |
||
3 | <head> |
||
4 | <meta charset="UTF-8"> |
||
5 | <title></title> |
||
6 | |||
7 | <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script> |
||
8 | <script type="text/javascript"> |
||
9 | |||
10 | require(["../lib/beautify-html"],function(html_beautify){ |
||
11 | var input = document.getElementById("input").value; |
||
12 | var output = html_beautify.html_beautify(input); |
||
13 | document.getElementById("output").innerHTML = output; |
||
14 | }); |
||
15 | |||
16 | </script> |
||
17 | |||
18 | <style type="text/css"> |
||
19 | #output{ |
||
20 | border: 1px solid black; |
||
21 | height: 300px; |
||
22 | width: 100%; |
||
23 | } |
||
24 | #input{ |
||
25 | width: 100%; |
||
26 | height: 300px; |
||
27 | } |
||
28 | </style> |
||
29 | </head> |
||
30 | <body> |
||
31 | |||
32 | <h1>RequireJS test</h1> |
||
33 | |||
34 | <p> |
||
35 | This example loads the html-beautifier by using a relative path in the require call to the beautify-html.js file. |
||
36 | (also works works with absolute paths) |
||
37 | </p> |
||
38 | |||
39 | <pre> |
||
40 | require(["../lib/beautify-html"],function(html_beautify){ |
||
41 | var input = document.getElementById("input").value; |
||
42 | var output = html_beautify.html_beautify(input); |
||
43 | document.getElementById("output").innerHTML = output; |
||
44 | }); |
||
45 | </pre> |
||
46 | |||
47 | <h2>Input</h2> |
||
48 | <textarea name="" id="input"> |
||
49 | <ul><li><a href="test"></a></li></ul> |
||
50 | </textarea> |
||
51 | |||
52 | <h2>Output</h2> |
||
53 | <textarea name="" id="output"> |
||
54 | |||
55 | </textarea> |
||
56 | |||
57 | </body> |
||
58 | </html> |