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