JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
vanilla ckeditor-3.2.1
[ckeditor.git] / _samples / output_xhtml.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
2 <!--\r
3 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.\r
4 For licensing, see LICENSE.html or http://ckeditor.com/license\r
5 -->\r
6 <html xmlns="http://www.w3.org/1999/xhtml">\r
7 <head>\r
8         <title>XHTML compliant output - CKEditor Sample</title>\r
9         <meta content="text/html; charset=utf-8" http-equiv="content-type" />\r
10         <script type="text/javascript" src="../ckeditor.js"></script>\r
11         <script src="sample.js" type="text/javascript"></script>\r
12         <link href="sample.css" rel="stylesheet" type="text/css" />\r
13 </head>\r
14 <body>\r
15         <h1>\r
16                 CKEditor Sample\r
17         </h1>\r
18         <!-- This <div> holds alert messages to be display in the sample page. -->\r
19         <div id="alerts">\r
20                 <noscript>\r
21                         <p>\r
22                                 <strong>CKEditor requires JavaScript to run</strong>. In a browser with no JavaScript\r
23                                 support, like yours, you should still see the contents (HTML data) and you should\r
24                                 be able to edit it normally, without a rich editor interface.\r
25                         </p>\r
26                 </noscript>\r
27         </div>\r
28         <form action="sample_posteddata.php" method="post">\r
29                 <p>\r
30                         This sample shows CKEditor configured to produce <strong>XHTML 1.1</strong> compliant\r
31                         HTML. Deprecated elements or attributes, like the &lt;font&gt; and &lt;u&gt; elements\r
32                         or the "style" attribute, are avoided.</p>\r
33                 <p>\r
34                         <label for="editor1">\r
35                                 Editor 1:</label><br />\r
36                         <textarea cols="80" id="editor1" name="editor1" rows="10">&lt;p&gt;This is some &lt;span class="Bold"&gt;sample text&lt;/span&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>\r
37                         <script type="text/javascript">\r
38                         //<![CDATA[\r
39 \r
40                                 CKEDITOR.replace( 'editor1',\r
41                                         {\r
42                                                 /*\r
43                                                  * Style sheet for the contents\r
44                                                  */\r
45                                                 contentsCss : 'assets/output_xhtml.css',\r
46 \r
47                                                 /*\r
48                                                  * Core styles.\r
49                                                  */\r
50                                                 coreStyles_bold : { element : 'span', attributes : {'class': 'Bold'} },\r
51                                                 coreStyles_italic       : { element : 'span', attributes : {'class': 'Italic'}},\r
52                                                 coreStyles_underline    : { element : 'span', attributes : {'class': 'Underline'}},\r
53                                                 coreStyles_strike       : { element : 'span', attributes : {'class': 'StrikeThrough'}, overrides : 'strike' },\r
54 \r
55                                                 coreStyles_subscript : { element : 'span', attributes : {'class': 'Subscript'}, overrides : 'sub' },\r
56                                                 coreStyles_superscript : { element : 'span', attributes : {'class': 'Superscript'}, overrides : 'sup' },\r
57 \r
58                                                 /*\r
59                                                  * Font face\r
60                                                  */\r
61                                                 // List of fonts available in the toolbar combo. Each font definition is\r
62                                                 // separated by a semi-colon (;). We are using class names here, so each font\r
63                                                 // is defined by {Combo Label}/{Class Name}.\r
64                                                 font_names : 'Comic Sans MS/FontComic;Courier New/FontCourier;Times New Roman/FontTimes',\r
65 \r
66                                                 // Define the way font elements will be applied to the document. The "span"\r
67                                                 // element will be used. When a font is selected, the font name defined in the\r
68                                                 // above list is passed to this definition with the name "Font", being it\r
69                                                 // injected in the "class" attribute.\r
70                                                 // We must also instruct the editor to replace span elements that are used to\r
71                                                 // set the font (Overrides).\r
72                                                 font_style :\r
73                                                 {\r
74                                                                 element         : 'span',\r
75                                                                 attributes              : { 'class' : '#(family)' },\r
76                                                                 overrides       : [ { element : 'span', attributes : { 'class' : /^Font(?:Comic|Courier|Times)$/ } } ]\r
77                                                 },\r
78 \r
79                                                 /*\r
80                                                  * Font sizes.\r
81                                                  */\r
82                                                 fontSize_sizes : 'Smaller/FontSmaller;Larger/FontLarger;8pt/FontSmall;14pt/FontBig;Double Size/FontDouble',\r
83                                                 fontSize_style :\r
84                                                         {\r
85                                                                 element         : 'span',\r
86                                                                 attributes      : { 'class' : '#(size)' },\r
87                                                                 overrides       : [ { element : 'span', attributes : { 'class' : /^Font(?:Smaller|Larger|Small|Big|Double)$/ } } ]\r
88                                                         } ,\r
89 \r
90                                                 /*\r
91                                                  * Font colors.\r
92                                                  */\r
93                                                 colorButton_enableMore : false,\r
94 \r
95                                                 colorButton_colors : 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00',\r
96                                                 colorButton_foreStyle :\r
97                                                         {\r
98                                                                 element : 'span',\r
99                                                                 attributes : { 'class' : '#(color)' },\r
100                                                                 overrides       : [ { element : 'span', attributes : { 'class' : /^FontColor(?:1|2|3)$/ } } ]\r
101                                                         },\r
102 \r
103                                                 colorButton_backStyle :\r
104                                                         {\r
105                                                                 element : 'span',\r
106                                                                 attributes : { 'class' : '#(color)BG' },\r
107                                                                 overrides       : [ { element : 'span', attributes : { 'class' : /^FontColor(?:1|2|3)BG$/ } } ]\r
108                                                         },\r
109 \r
110                                                 /*\r
111                                                  * Indentation.\r
112                                                  */\r
113                                                 indentClasses : ['Indent1', 'Indent2', 'Indent3'],\r
114 \r
115                                                 /*\r
116                                                  * Paragraph justification.\r
117                                                  */\r
118                                                 justifyClasses : [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull' ],\r
119 \r
120                                                 /*\r
121                                                  * Styles combo.\r
122                                                  */\r
123                                                 stylesSet :\r
124                                                                 [\r
125                                                                         { name : 'Strong Emphasis', element : 'strong' },\r
126                                                                         { name : 'Emphasis', element : 'em' },\r
127 \r
128                                                                         { name : 'Computer Code', element : 'code' },\r
129                                                                         { name : 'Keyboard Phrase', element : 'kbd' },\r
130                                                                         { name : 'Sample Text', element : 'samp' },\r
131                                                                         { name : 'Variable', element : 'var' },\r
132 \r
133                                                                         { name : 'Deleted Text', element : 'del' },\r
134                                                                         { name : 'Inserted Text', element : 'ins' },\r
135 \r
136                                                                         { name : 'Cited Work', element : 'cite' },\r
137                                                                         { name : 'Inline Quotation', element : 'q' }\r
138                                                                 ]\r
139 \r
140                                         });\r
141                         //]]>\r
142                         </script>\r
143                 </p>\r
144                 <p>\r
145                         <input type="submit" value="Submit" />\r
146                 </p>\r
147         </form>\r
148         <div id="footer">\r
149                 <hr />\r
150                 <p>\r
151                         CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>\r
152                 </p>\r
153                 <p id="copy">\r
154                         Copyright &copy; 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico\r
155                         Knabben. All rights reserved.\r
156                 </p>\r
157         </div>\r
158 </body>\r
159 </html>\r