Ticket #5024: xhtml.html

File xhtml.html, 6.0 KB (added by Alfonso Martínez de Lizarrondo, 14 years ago)

Proposed XHTML sample

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<!--
3Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
4For 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 &lt;font&gt; and &lt;u&gt; 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">&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>
41                        <script type="text/javascript">
42                        //<![CDATA[
43
44                                CKEDITOR.replace( 'editor1',
45                                        {
46                                                /*
47                                                 * Style sheet for the contents
48                                                 */
49                                                contentsCss : 'assets/xhtml.styles.css',
50
51                                                /*
52                                                 * Core styles.
53                                                 */
54                                                coreStyles_bold : { element : 'span', attributes : {'class': 'Bold'}, overrides : ['b', 'strong'] },
55                                                coreStyles_italic       : { element : 'span', attributes : {'class': 'Italic'}, overrides : ['em', 'i'] },
56                                                coreStyles_underline    : { element : 'span', attributes : {'class': 'Underline'}, overrides : 'u' },
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                                                // The it's not possible to specify custom names for these elements
100                                                // http://dev.fckeditor.net/ticket/5150
101                                                colorButton_colors : 'ff9900,0066cc,ff0000',
102                                                colorButton_foreStyle :
103                                                        {
104                                                                element : 'span',
105                                                                attributes : { 'class' : 'Color(color)' }
106                                                        },
107
108                                                colorButton_backStyle :
109                                                        {
110                                                                element : 'span',
111                                                                attributes : { 'class' : 'BGColor(color)' }
112                                                        },
113
114                                                /*
115                                                 * Indentation.
116                                                 */
117                                                 // It works correctly only for the first level
118                                                 // http://dev.fckeditor.net/ticket/5152
119                                                indentClasses : ['Indent1', 'Indent2', 'Indent3'],
120
121                                                /*
122                                                 * Paragraph justification.
123                                                 */
124                                                justifyClasses : [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull' ] //,
125
126                                                /*
127                                                 * Styles combo.
128                                                 */
129        //                                      stylesCombo_stylesSet : 'my_styles'
130
131                                        });
132/*
133// Define the styles inline
134CKEDITOR.addStylesSet( 'my_styles',
135[
136    { name : 'Strong Emphasis', element : 'strong' },
137    { name : 'Emphasis', element : 'em' },
138
139    { name : 'Computer Code', element : 'code' },
140    { name : 'Keyboard Phrase', element : 'kbd' },
141    { name : 'Sample Text', element : 'samp' },
142    { name : 'Variable', element : 'var' },
143
144    { name : 'Deleted Text', element : 'del' },
145    { name : 'Inserted Text', element : 'ins' },
146               
147    { name : 'Cited Work', element : 'cite' },
148    { name : 'Inline Quotation', element : 'q' }
149]);
150*/
151                        //]]>
152                        </script>
153                </p>
154                <p>
155                        <input type="submit" value="Submit" />
156                </p>
157        </form>
158        <div id="footer">
159                <hr />
160                <p>
161                        CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
162                </p>
163                <p id="copy">
164                        Copyright &copy; 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
165                        Knabben. All rights reserved.
166                </p>
167        </div>
168</body>
169</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy