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