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