annotate index.xhtml @ 3:6ef82d6818f4

readme
author Fabien Cazenave <fabien@cazenave.cc>
date Mon, 19 Dec 2011 19:00:15 +0100
parents 683f56999fb3
children 03ef53b969bd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
1 <!DOCTYPE html>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
2 <html xmlns="http://www.w3.org/1999/xhtml">
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
3 <head>
2
683f56999fb3 'DOMNodeFocused' pseudo-event + Mutation Event Demo
Fabien Cazenave <fabien@cazenave.cc>
parents: 1
diff changeset
4 <meta charset="UTF-8" />
1
eb3679d92996 put JS and CSS code in separated files
Sonny Piers <sonny.piers@gmail.com>
parents: 0
diff changeset
5 <title> barbecue </title>
eb3679d92996 put JS and CSS code in separated files
Sonny Piers <sonny.piers@gmail.com>
parents: 0
diff changeset
6 <link type="text/css" href="style.css" rel="stylesheet" />
2
683f56999fb3 'DOMNodeFocused' pseudo-event + Mutation Event Demo
Fabien Cazenave <fabien@cazenave.cc>
parents: 1
diff changeset
7 <script type="text/javascript" src="script.js"></script>
0
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
8 </head>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
9 <body>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
10 <form id="toolbar">
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
11 <dl>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
12 <dt> edit: </dt>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
13 <dd>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
14 <input type="button" value=" " data-command="undo" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
15 <input type="button" value=" " data-command="redo" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
16 |
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
17 <input type="button" value=" " data-command="cut" disabled="" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
18 <input type="button" value=" " data-command="copy" disabled="" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
19 <input type="button" value=" " data-command="paste" disabled="" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
20 |
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
21 <input type="checkbox" id="useCSS" data-command="styleWithCSS" checked="" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
22 <label for="useCSS">style with CSS</label>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
23 </dd>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
24 <dt> inline: </dt>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
25 <dd>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
26 <select data-command="fontName">
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
27 <option value="" disabled="" selected=""> Font </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
28 <option value="serif"> serif </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
29 <option value="sans-serif"> sans-serif </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
30 <option value="monospace"> monospace </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
31 <option value=" " disabled=""> - </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
32 <option value="Arial"> Arial </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
33 <option value="Courier New"> Courier New </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
34 <option value="Times New Roman"> Times New Roman </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
35 <option value="Verdana"> Verdana </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
36 </select>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
37 <select data-command="fontSize">
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
38 <option value="" disabled="" selected=""> Size </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
39 <option value="1"> 1 </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
40 <option value="2"> 2 </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
41 <option value="3"> 3 </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
42 <option value="4"> 4 </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
43 <option value="5"> 5 </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
44 <option value="6"> 6 </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
45 <option value="7"> 7 </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
46 </select>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
47 <input type="button" value="-" data-command="decreaseFontSize" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
48 <input type="button" value="+" data-command="increaseFontSize" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
49 |
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
50 <input type="button" value=" " data-command="bold" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
51 <input type="button" value=" " data-command="italic" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
52 <input type="button" value=" " data-command="underline" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
53 <input type="button" value=" " data-command="strikeThrough" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
54 |
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
55 <input type="button" value=" " data-command="subscript" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
56 <input type="button" value=" " data-command="superscript" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
57 </dd>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
58 <dt> block: </dt>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
59 <dd>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
60 <select data-command="formatBlock">
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
61 <option value="" disabled="" selected=""> Format </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
62 <option value="&lt;p&gt;"> paragraph </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
63 <option value="&lt;h1&gt;"> heading 1 </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
64 <option value="&lt;h2&gt;"> heading 2 </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
65 <option value="&lt;h3&gt;"> heading 3 </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
66 <option value="&lt;h4&gt;"> heading 4 </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
67 <option value="&lt;h5&gt;"> heading 5 </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
68 <option value="&lt;h6&gt;"> heading 6 </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
69 <option value="&lt;address&gt;"> address </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
70 <option value="&lt;pre&gt;"> preformatted </option>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
71 </select>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
72 |
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
73 <input type="button" value=" " data-command="justifyLeft" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
74 <input type="button" value=" " data-command="justifyCenter" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
75 <input type="button" value=" " data-command="justifyRight" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
76 <input type="button" value=" " data-command="justifyFull" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
77 |
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
78 <input type="button" value=" " data-command="outdent" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
79 <input type="button" value=" " data-command="indent" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
80 |
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
81 <input type="button" value=" " data-command="insertOrderedList" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
82 <input type="button" value=" " data-command="insertUnorderedList" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
83 </dd>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
84 </dl>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
85 <pre id="execCommand" />
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
86 </form>
2
683f56999fb3 'DOMNodeFocused' pseudo-event + Mutation Event Demo
Fabien Cazenave <fabien@cazenave.cc>
parents: 1
diff changeset
87 <pre id="breadcrumb"> </pre>
0
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
88
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
89 <section contenteditable="true">
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
90 <h2> Go ahead, edit away! </h2>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
91 <p> Here's a typical paragraph element </p>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
92 <ol><li> and now a list </li><li> with only </li><li> three items </li></ol>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
93 </section>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
94
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
95 <footer contenteditable="true">
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
96 <p>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
97 This HTML content editor is not intended to compete with <a
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
98 href="http://ckeditor.com/">CKEditor</a> or <a
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
99 href="http://tinymce.com/">TinyMCE</a>: it is designed to
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
100 <strong>test</strong> the various implementations of
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
101 <code>contentEditable</code> and <code>execCommand</code>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
102 in modern browsers.
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
103 </p>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
104 <p>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
105 This is a standalone file: the JavaScript code (&lt;40 lines!), CSS markup and
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
106 images are embedded. Feel free to download it to try it offline.
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
107 </p>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
108 <p>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
109 Useful links:
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
110 <a href="https://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla">Mozilla Developer Network</a>,
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
111 <a href="http://html5demos.com/contenteditable/">html5demos.com</a>,
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
112 <a href="http://www.browserscope.org/richtext2/test">Browserscope.org</a>.
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
113 </p>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
114 </footer>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
115 </body>
891d16fda2e2 initial push
Sonny Piers <sonny.piers@gmail.com>
parents:
diff changeset
116 </html>