Changeset 932

Show
Ignore:
Timestamp:
2007-10-01 13:54:06 (14 months ago)
Author:
fredck
Message:

Fixed #1313 : Completed the XHTML 1.1 sample.

Location:
FCKeditor/trunk/_samples/html
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor/trunk/_samples/html/sample14.config.js

    r830 r932  
    3131FCKConfig.EditorAreaCSS = FCKConfig.BasePath + '../_samples/html/sample14.styles.css' ; 
    3232 
    33 // Define the CSS classes used for the alignment commands. 
    34 FCKConfig.JustifyLeftClass              = 'JustifyLeft' ; 
    35 FCKConfig.JustifyRightClass             = 'JustifyRight' ; 
    36 FCKConfig.JustifyCenterClass    = 'JustifyCenter' ; 
    37 FCKConfig.JustifyFullClass              = 'JustifyFull' ; 
     33/** 
     34 * Core styles. 
     35 */ 
     36FCKConfig.CoreStyles.Bold                       = { Element : 'span', Attributes : { 'class' : 'Bold' } } ; 
     37FCKConfig.CoreStyles.Italic                     = { Element : 'span', Attributes : { 'class' : 'Italic' } } ; 
     38FCKConfig.CoreStyles.Underline          = { Element : 'span', Attributes : { 'class' : 'Underline' } } ; 
     39FCKConfig.CoreStyles.StrikeThrough      = { Element : 'span', Attributes : { 'class' : 'StrikeThrough' } } ; 
    3840 
    39 // Some buttons, like form elements, have been removed from the default toolbar 
    40 // to make the sample simpler, but others have been removed also for XHTML 1.1 
    41 // compliance, like the color selectors. 
    42 FCKConfig.ToolbarSets["XHTML11"] = [ 
    43         ['Source','-','Save','NewPage','Preview'], 
    44         ['Cut','Copy','Paste','-','Print','SpellCheck'], 
    45         ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], 
    46         '/', 
    47         ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], 
    48         ['OrderedList','UnorderedList','-','Outdent','Indent'], 
    49         ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'], 
    50         ['Link','Unlink','Anchor'], 
    51         ['Image','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'], 
    52         '/', 
    53         ['Style','FontFormat','FontName','FontSize'], 
    54         ['FitWindow','ShowBlocks','-','About']          // No comma for the last row. 
    55 ] ; 
     41/** 
     42 * Font face 
     43 */ 
     44// List of fonts available in the toolbar combo. Each font definition is 
     45// separated by a semi-colon (;). We are using class names here, so each font 
     46// is defined by {Class Name}/{Combo Label}. 
     47FCKConfig.FontNames = 'FontComic/Comic Sans MS;FontCourier/Courier New;FontTimes/Times New Roman' ; 
     48 
     49// Define the way font elements will be applied to the document. The "span" 
     50// element will be used. When a font is selected, the font name defined in the 
     51// above list is passed to this definition with the name "Font", being it 
     52// injected in the "class" attribute. 
     53// We must also instruct the editor to replace span elements that are used to 
     54// set the font (Overrides). 
     55FCKConfig.CoreStyles.FontFace = 
     56        { 
     57                Element         : 'span', 
     58                Attributes      : { 'class' : '#("Font")' }, 
     59                Overrides       : [ { Element : 'span', Attributes : { 'class' : /^Font(?:Comic|Courier|Times)$/ } } ] 
     60        } ; 
     61 
     62/** 
     63 * Font sizes. 
     64 */ 
     65FCKConfig.FontSizes             = 'FontSmaller/Smaller;FontLarger/Larger;FontSmall/8pt;FontBig/14pt;FontDouble/Double Size' ; 
     66FCKConfig.CoreStyles.Size = 
     67        { 
     68                Element         : 'span', 
     69                Attributes      : { 'class' : '#("Size")' }, 
     70                Overrides       : [ { Element : 'span', Attributes : { 'class' : /^Font(?:Smaller|Larger|Small|Big|Double)$/ } } ] 
     71        } ; 
     72 
     73/** 
     74 * Font colors. 
     75 */ 
     76FCKConfig.EnableMoreFontColors = false ; 
     77FCKConfig.FontColors = 'ff9900/FontColor1,0066cc/FontColor2,ff0000/FontColor3' ; 
     78FCKConfig.CoreStyles.Color = 
     79        { 
     80                Element         : 'span', 
     81                Attributes      : { 'class' : '#("Color")' }, 
     82                Overrides       : [ { Element : 'span', Attributes : { 'class' : /^FontColor(?:1|2|3)$/ } } ] 
     83        } ; 
     84 
     85FCKConfig.CoreStyles.BackColor = 
     86        { 
     87                Element         : 'span', 
     88                Attributes      : { 'class' : '#("Color")BG' }, 
     89                Overrides       : [ { Element : 'span', Attributes : { 'class' : /^FontColor(?:1|2|3)BG$/ } } ] 
     90        } ; 
     91 
     92/** 
     93 * Indentation. 
     94 */ 
     95FCKConfig.IndentClasses = [ 'Indent1', 'Indent2', 'Indent3' ] ; 
     96 
     97/** 
     98 * Paragraph justification. 
     99 */ 
     100FCKConfig.JustifyClasses = [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull' ] ; 
     101 
     102/** 
     103 * Styles combo. 
     104 */ 
     105FCKConfig.StylesXmlPath = '' ; 
     106FCKConfig.CustomStyles = 
     107        { 
     108                'Strong Emphasis' : { Element : 'strong' }, 
     109                'Emphasis' : { Element : 'em' }, 
     110 
     111                'Computer Code' : { Element : 'code' }, 
     112                'Keyboard Phrase' : { Element : 'kbd' }, 
     113                'Sample Text' : { Element : 'samp' }, 
     114                'Variable' : { Element : 'var' }, 
     115 
     116                'Deleted Text' : { Element : 'del' }, 
     117                'Inserted Text' : { Element : 'ins' }, 
     118 
     119                'Cited Work' : { Element : 'cite' }, 
     120                'Inline Quotation' : { Element : 'q' } 
     121        } ; 
  • FCKeditor/trunk/_samples/html/sample14.html

    r830 r932  
    3535        </h1> 
    3636        <div> 
    37                 This sample shows FCKeditor configured for <strong>XHTML 1.1</strong> compliance. 
     37                This sample shows FCKeditor configured to produce <strong>XHTML 1.1</strong> compliant 
     38                HTML. Deprecated elements or attributes, like the &lt;font&gt; and &lt;u&gt; elements 
     39                or the "style" attribute, are avoided. 
     40        </div> 
    3841        <hr /> 
    39         </div> 
    4042        <form action="sampleposteddata.asp" method="post" target="_blank"> 
    4143                <script type="text/javascript"> 
     
    5456 
    5557oFCKeditor.Height = 300 ; 
    56 oFCKeditor.Value = '<p>This is some <strong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; 
     58oFCKeditor.Value = '<p>This is some <span class="Bold">sample text<\/span>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; 
    5759oFCKeditor.Create() ; 
    5860//--> 
  • FCKeditor/trunk/_samples/html/sample14.styles.css

    r830 r932  
    4040a[href] 
    4141{ 
    42         color: #0000FF !important;      /* For Firefox... mark as important, otherwise it becomes black */ 
    43 } 
    44  
    45 /** 
    46  * Alignment command classes. 
     42        color: #0000FF !important; /* For Firefox... mark as important, otherwise it becomes black */ 
     43} 
     44 
     45/** 
     46 * Core styles. 
     47 */ 
     48 
     49.Bold 
     50{ 
     51        font-weight: bold; 
     52} 
     53 
     54.Italic 
     55{ 
     56        font-style: italic; 
     57} 
     58 
     59.Underline 
     60{ 
     61        text-decoration: underline; 
     62} 
     63 
     64.StrikeThrough 
     65{ 
     66        text-decoration: line-through; 
     67} 
     68 
     69.Subscript 
     70{ 
     71        vertical-align: sub; 
     72        font-size: smaller; 
     73} 
     74 
     75.Superscript 
     76{ 
     77        vertical-align: super; 
     78        font-size: smaller; 
     79} 
     80 
     81/** 
     82 * Font faces. 
     83 */ 
     84 
     85.FontComic 
     86{ 
     87        font-family: 'Comic Sans MS'; 
     88} 
     89 
     90.FontCourier 
     91{ 
     92        font-family: 'Courier New'; 
     93} 
     94 
     95.FontTimes 
     96{ 
     97        font-family: 'Times New Roman'; 
     98} 
     99 
     100/** 
     101 * Font sizes. 
     102 */ 
     103 
     104.FontSmaller 
     105{ 
     106        font-size: smaller; 
     107} 
     108 
     109.FontLarger 
     110{ 
     111        font-size: larger; 
     112} 
     113 
     114.FontSmall 
     115{ 
     116        font-size: 8pt; 
     117} 
     118 
     119.FontBig 
     120{ 
     121        font-size: 14pt; 
     122} 
     123 
     124.FontDouble 
     125{ 
     126        font-size: 200%; 
     127} 
     128 
     129/** 
     130 * Font colors. 
     131 */ 
     132.FontColor1 
     133{ 
     134        color: #ff9900; 
     135} 
     136 
     137.FontColor2 
     138{ 
     139        color: #0066cc; 
     140} 
     141 
     142.FontColor3 
     143{ 
     144        color: #ff0000; 
     145} 
     146 
     147.FontColor1BG 
     148{ 
     149        background-color: #ff9900; 
     150} 
     151 
     152.FontColor2BG 
     153{ 
     154        background-color: #0066cc; 
     155} 
     156 
     157.FontColor3BG 
     158{ 
     159        background-color: #ff0000; 
     160} 
     161 
     162/** 
     163 * Indentation. 
     164 */ 
     165 
     166.Indent1 
     167{ 
     168        margin-left: 40px; 
     169} 
     170 
     171.Indent2 
     172{ 
     173        margin-left: 80px; 
     174} 
     175 
     176.Indent3 
     177{ 
     178        margin-left: 120px; 
     179} 
     180 
     181/** 
     182 * Alignment. 
    47183 */ 
    48184 
     
    60196{ 
    61197        text-align: center; 
    62         background-color:Red; 
    63198} 
    64199 
     
    67202        text-align: justify; 
    68203} 
     204 
     205/** 
     206 * Other. 
     207 */ 
     208 
     209code 
     210{ 
     211        font-family: courier, monospace; 
     212        background-color: #eeeeee; 
     213        padding-left: 1px; 
     214        padding-right: 1px; 
     215        border: #c0c0c0 1px solid; 
     216} 
     217 
     218kbd 
     219{ 
     220        padding: 0px 1px 0px 1px; 
     221        border-width: 1px 2px 2px 1px; 
     222        border-style: solid; 
     223} 
     224 
     225blockquote 
     226{ 
     227        color: #808080; 
     228}