Ticket #5024: 5024_3.patch

File 5024_3.patch, 10.1 KB (added by Alfonso Martínez de Lizarrondo, 14 years ago)

Revised patch

  • _samples/assets/output_xhtml.css

    Property changes on: _samples\assets
    ___________________________________________________________________
    Added: bugtraq:label
       + Ticket
    Added: bugtraq:url
       + http://dev.fckeditor.net/ticket/%BUGID%
    Added: webviewer:pathrevision
       + http://dev.fckeditor.net/browser/%PATH%?rev=%REVISION% 
    Added: webviewer:revision
       + http://dev.fckeditor.net/changeset/%REVISION%
    Added: bugtraq:logregex
       + (?:ticket: *|#)(\d+) *(?:, *(\d+))*
    
    
     
     1/*
     2 * Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
     3 * For licensing, see LICENSE.html or http://ckeditor.com/license
     4 *
     5 * Styles used by the XHTML 1.1 sample page (xhtml.html).
     6 */
     7
     8/**
     9 * Basic definitions for the editing area.
     10 */
     11body
     12{
     13        font-family: Arial, Verdana, sans-serif;
     14        font-size: 80%;
     15        color: #000000;
     16        background-color: #ffffff;
     17        padding: 5px;
     18        margin: 0px;
     19}
     20
     21/**
     22 * Core styles.
     23 */
     24
     25.Bold
     26{
     27        font-weight: bold;
     28}
     29
     30.Italic
     31{
     32        font-style: italic;
     33}
     34
     35.Underline
     36{
     37        text-decoration: underline;
     38}
     39
     40.StrikeThrough
     41{
     42        text-decoration: line-through;
     43}
     44
     45.Subscript
     46{
     47        vertical-align: sub;
     48        font-size: smaller;
     49}
     50
     51.Superscript
     52{
     53        vertical-align: super;
     54        font-size: smaller;
     55}
     56
     57/**
     58 * Font faces.
     59 */
     60
     61.FontComic
     62{
     63        font-family: 'Comic Sans MS';
     64}
     65
     66.FontCourier
     67{
     68        font-family: 'Courier New';
     69}
     70
     71.FontTimes
     72{
     73        font-family: 'Times New Roman';
     74}
     75
     76/**
     77 * Font sizes.
     78 */
     79
     80.FontSmaller
     81{
     82        font-size: smaller;
     83}
     84
     85.FontLarger
     86{
     87        font-size: larger;
     88}
     89
     90.FontSmall
     91{
     92        font-size: 8pt;
     93}
     94
     95.FontBig
     96{
     97        font-size: 14pt;
     98}
     99
     100.FontDouble
     101{
     102        font-size: 200%;
     103}
     104
     105/**
     106 * Font colors.
     107 */
     108.FontColor1
     109{
     110        color: #ff9900;
     111}
     112
     113.FontColor2
     114{
     115        color: #0066cc;
     116}
     117
     118.FontColor3
     119{
     120        color: #ff0000;
     121}
     122
     123.FontColor1BG
     124{
     125        background-color: #ff9900;
     126}
     127
     128.FontColor2BG
     129{
     130        background-color: #0066cc;
     131}
     132
     133.FontColor3BG
     134{
     135        background-color: #ff0000;
     136}
     137
     138/**
     139 * Indentation.
     140 */
     141
     142.Indent1
     143{
     144        margin-left: 40px;
     145}
     146
     147.Indent2
     148{
     149        margin-left: 80px;
     150}
     151
     152.Indent3
     153{
     154        margin-left: 120px;
     155}
     156
     157/**
     158 * Alignment.
     159 */
     160
     161.JustifyLeft
     162{
     163        text-align: left;
     164}
     165
     166.JustifyRight
     167{
     168        text-align: right;
     169}
     170
     171.JustifyCenter
     172{
     173        text-align: center;
     174}
     175
     176.JustifyFull
     177{
     178        text-align: justify;
     179}
     180
     181/**
     182 * Other.
     183 */
     184
     185code
     186{
     187        font-family: courier, monospace;
     188        background-color: #eeeeee;
     189        padding-left: 1px;
     190        padding-right: 1px;
     191        border: #c0c0c0 1px solid;
     192}
     193
     194kbd
     195{
     196        padding: 0px 1px 0px 1px;
     197        border-width: 1px 2px 2px 1px;
     198        border-style: solid;
     199}
     200
     201blockquote
     202{
     203        color: #808080;
     204}
  • _samples/index.html

     
    3939                <li><a href="enterkey.html">Using the "Enter" key in CKEditor</a></li>
    4040                <li><a href="sharedspaces.html">Shared toolbars</a></li>
    4141                <li><a href="jqueryadapter.html">jQuery adapter example</a></li>
     42                <li><a href="output_xhtml.html">Output XHTML</a></li>
    4243        </ul>
    4344        <div id="footer">
    4445                <hr />
  • _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">
     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/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                                                stylesCombo_stylesSet : 'my_styles',
     128                                               
     129                                                // Usually this call to CKEDITOR.stylesSet.add can be placed in the main
     130                                                // script, but it can fail while working with the source files
     131                                                on : { 'pluginsLoaded' : function()
     132                                                        {
     133                                                                // Define the styles inline
     134                                                                CKEDITOR.stylesSet.add( '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
     153                                        });
     154                        //]]>
     155                        </script>
     156                </p>
     157                <p>
     158                        <input type="submit" value="Submit" />
     159                </p>
     160        </form>
     161        <div id="footer">
     162                <hr />
     163                <p>
     164                        CKEditor - The text editor for Internet - <a href="http://ckeditor.com/">http://ckeditor.com</a>
     165                </p>
     166                <p id="copy">
     167                        Copyright &copy; 2003-2010, <a href="http://cksource.com/">CKSource</a> - Frederico
     168                        Knabben. All rights reserved.
     169                </p>
     170        </div>
     171</body>
     172</html>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy