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