forked from dejan/jquery-auto_html
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
61 lines (49 loc) · 1.82 KB
/
demo.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
<!DOCTYPE html>
<html>
<head>
<title>Demo of jquery.auto_html.js</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js" type="text/javascript"></script>
<script src="jquery.auto_html.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
pre, .comment {
background:#eee;
padding: 20px
}
</style>
</head>
<body>
<h2>Given this code:</h2>
<pre>
$('.comment')
.simpleFormat()
.image({width: '500px'})
.youtube({width:500, height:400})
.link();
</pre>
<h2>And this content of a div with class 'comment':</h2>
<pre>http://gogreece2014.com/wp-content/uploads/2013/09/mykonos8.jpg
And you will go to Mykonos
With a vision of a gentle coast
And a sun to maybe dissipate
Shadows of the mess you made
http://www.youtube.com/watch?v=DT-dxG4WWf4
</pre>
<h2>This will be the output:</h2>
<pre><xmp><p><img src="http://gogreece2014.com/wp-content/uploads/2013/09/mykonos8.jpg" alt="" width="500px"></p><p>And you will go to Mykonos<br>With a vision of a gentle coast<br>And a sun to maybe dissipate<br>Shadows of the mess you made</p><p><iframe class="youtube-player" type="text/html" width="500" height="400" src="http://www.youtube.com/embed/DT-dxG4WWf4" frameborder="0"></iframe></xmp></pre>
<h2>And it will look like this:</h2>
<div class='comment'>http://gogreece2014.com/wp-content/uploads/2013/09/mykonos8.jpg
And you will go to Mykonos
With a vision of a gentle coast
And a sun to maybe dissipate
Shadows of the mess you made
http://www.youtube.com/watch?v=DT-dxG4WWf4</div>
</body>
<script type="text/javascript">
$('.comment')
.simpleFormat()
.image({width: '500px'})
.youtube({width:500, height:400})
.link();
</script>
</html>