OLD | NEW |
| (Empty) |
1 <!-- | |
2 @license | |
3 Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | |
4 This code may only be used under the BSD style license found at http://polym
er.github.io/LICENSE.txt | |
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS
.txt | |
6 The complete set of contributors may be found at http://polymer.github.io/CO
NTRIBUTORS.txt | |
7 Code distributed by Google as part of the polymer project is also | |
8 subject to an additional IP rights grant found at http://polymer.github.io/P
ATENTS.txt | |
9 --> | |
10 <!doctype html> | |
11 <html> | |
12 <head> | |
13 <title>prettify-element Demo</title> | |
14 | |
15 <script src="../platform/platform.js"></script> | |
16 <link rel="import" href="prettify-element.html"> | |
17 | |
18 </head> | |
19 <body unresolved> | |
20 | |
21 <p>Highlight from text value:</p> | |
22 <hr> | |
23 | |
24 <prettify-element text='<!DOCTYPE html> | |
25 <title>Title</title> | |
26 | |
27 <style>body {width: 500px;}</style> | |
28 | |
29 <script type="application/javascript"> | |
30 function $init() {return true;} | |
31 </script> | |
32 | |
33 <body> | |
34 <p checked class="title" id="title">Title</p> | |
35 <!-- here goes the rest of the page --> | |
36 </body>'> | |
37 </prettify-element> | |
38 | |
39 | |
40 | |
41 <p>Highlight text content:</p> | |
42 <hr> | |
43 | |
44 <prettify-element> | |
45 # hello world | |
46 | |
47 you can write text [with links](http://example.com) inline or [link references][
1]. | |
48 | |
49 * one _thing_ has *em*phasis | |
50 * two __things__ are **bold** | |
51 | |
52 --- | |
53 | |
54 hello world | |
55 =========== | |
56 | |
57 <this_is inline="xml"></this_is> | |
58 | |
59 > markdown is so cool | |
60 | |
61 so are code segments | |
62 | |
63 1. one thing (yeah!) | |
64 2. two thing `i can write code`, and `more` wipee! | |
65 | |
66 [1]: http://example.com | |
67 </prettify-element> | |
68 | |
69 | |
70 | |
71 | |
72 <p>Highlight using template:</p> | |
73 <hr> | |
74 | |
75 <prettify-element> | |
76 <template> | |
77 <div> | |
78 <p>HTML is inert in <template></template>, we can use it to highlight | |
79 <strong>a subset</strong> of HTML directly without escaping.</p> | |
80 </div> | |
81 </template> | |
82 </prettify-element> | |
83 | |
84 </body> | |
85 </html> | |
OLD | NEW |