--
This commit is contained in:
parent
24f3d27984
commit
6b60015c02
9588 changed files with 1149251 additions and 49 deletions
58
node_modules/js-beautify/js/test/requirejs-html-beautify.html
generated
vendored
Normal file
58
node_modules/js-beautify/js/test/requirejs-html-beautify.html
generated
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<!doctype html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
require(["../lib/beautify-html"],function(html_beautify){
|
||||
var input = document.getElementById("input").value;
|
||||
var output = html_beautify.html_beautify(input);
|
||||
document.getElementById("output").innerHTML = output;
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
#output{
|
||||
border: 1px solid black;
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
}
|
||||
#input{
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>RequireJS test</h1>
|
||||
|
||||
<p>
|
||||
This example loads the html-beautifier by using a relative path in the require call to the beautify-html.js file.
|
||||
(also works works with absolute paths)
|
||||
</p>
|
||||
|
||||
<pre>
|
||||
require(["../lib/beautify-html"],function(html_beautify){
|
||||
var input = document.getElementById("input").value;
|
||||
var output = html_beautify.html_beautify(input);
|
||||
document.getElementById("output").innerHTML = output;
|
||||
});
|
||||
</pre>
|
||||
|
||||
<h2>Input</h2>
|
||||
<textarea name="" id="input">
|
||||
<ul><li><a href="test"></a></li></ul>
|
||||
</textarea>
|
||||
|
||||
<h2>Output</h2>
|
||||
<textarea name="" id="output">
|
||||
|
||||
</textarea>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in a new issue