1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
\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
6 <html xmlns="http://www.w3.org/1999/xhtml">
\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
18 <!-- This <div> holds alert messages to be display in the sample page. -->
\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
28 <form action="sample_posteddata.php" method="post">
\r
30 This sample shows CKEditor configured to produce <strong>XHTML 1.1</strong> compliant
\r
31 HTML. Deprecated elements or attributes, like the <font> and <u> elements
\r
32 or the "style" attribute, are avoided.</p>
\r
34 <label for="editor1">
\r
35 Editor 1:</label><br />
\r
36 <textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <span class="Bold">sample text</span>. You are using <a href="http://ckeditor.com/">CKEditor</a>.</p></textarea>
\r
37 <script type="text/javascript">
\r
40 CKEDITOR.replace( 'editor1',
\r
43 * Style sheet for the contents
\r
45 contentsCss : 'assets/output_xhtml.css',
\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
55 coreStyles_subscript : { element : 'span', attributes : {'class': 'Subscript'}, overrides : 'sub' },
\r
56 coreStyles_superscript : { element : 'span', attributes : {'class': 'Superscript'}, overrides : 'sup' },
\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
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
75 attributes : { 'class' : '#(family)' },
\r
76 overrides : [ { element : 'span', attributes : { 'class' : /^Font(?:Comic|Courier|Times)$/ } } ]
\r
82 fontSize_sizes : 'Smaller/FontSmaller;Larger/FontLarger;8pt/FontSmall;14pt/FontBig;Double Size/FontDouble',
\r
86 attributes : { 'class' : '#(size)' },
\r
87 overrides : [ { element : 'span', attributes : { 'class' : /^Font(?:Smaller|Larger|Small|Big|Double)$/ } } ]
\r
93 colorButton_enableMore : false,
\r
95 colorButton_colors : 'FontColor1/FF9900,FontColor2/0066CC,FontColor3/F00',
\r
96 colorButton_foreStyle :
\r
99 attributes : { 'class' : '#(color)' },
\r
100 overrides : [ { element : 'span', attributes : { 'class' : /^FontColor(?:1|2|3)$/ } } ]
\r
103 colorButton_backStyle :
\r
106 attributes : { 'class' : '#(color)BG' },
\r
107 overrides : [ { element : 'span', attributes : { 'class' : /^FontColor(?:1|2|3)BG$/ } } ]
\r
113 indentClasses : ['Indent1', 'Indent2', 'Indent3'],
\r
116 * Paragraph justification.
\r
118 justifyClasses : [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull' ],
\r
125 { name : 'Strong Emphasis', element : 'strong' },
\r
126 { name : 'Emphasis', element : 'em' },
\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
133 { name : 'Deleted Text', element : 'del' },
\r
134 { name : 'Inserted Text', element : 'ins' },
\r
136 { name : 'Cited Work', element : 'cite' },
\r
137 { name : 'Inline Quotation', element : 'q' }
\r
145 <input type="submit" value="Submit" />
\r
151 CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
\r
154 Copyright © 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
\r
155 Knabben. All rights reserved.
\r