Changeset 932
- Timestamp:
- 2007-10-01 13:54:06 (14 months ago)
- Location:
- FCKeditor/trunk/_samples/html
- Files:
-
- 3 modified
-
sample14.config.js (modified) (1 diff)
-
sample14.html (modified) (2 diffs)
-
sample14.styles.css (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/_samples/html/sample14.config.js
r830 r932 31 31 FCKConfig.EditorAreaCSS = FCKConfig.BasePath + '../_samples/html/sample14.styles.css' ; 32 32 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 */ 36 FCKConfig.CoreStyles.Bold = { Element : 'span', Attributes : { 'class' : 'Bold' } } ; 37 FCKConfig.CoreStyles.Italic = { Element : 'span', Attributes : { 'class' : 'Italic' } } ; 38 FCKConfig.CoreStyles.Underline = { Element : 'span', Attributes : { 'class' : 'Underline' } } ; 39 FCKConfig.CoreStyles.StrikeThrough = { Element : 'span', Attributes : { 'class' : 'StrikeThrough' } } ; 38 40 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}. 47 FCKConfig.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). 55 FCKConfig.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 */ 65 FCKConfig.FontSizes = 'FontSmaller/Smaller;FontLarger/Larger;FontSmall/8pt;FontBig/14pt;FontDouble/Double Size' ; 66 FCKConfig.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 */ 76 FCKConfig.EnableMoreFontColors = false ; 77 FCKConfig.FontColors = 'ff9900/FontColor1,0066cc/FontColor2,ff0000/FontColor3' ; 78 FCKConfig.CoreStyles.Color = 79 { 80 Element : 'span', 81 Attributes : { 'class' : '#("Color")' }, 82 Overrides : [ { Element : 'span', Attributes : { 'class' : /^FontColor(?:1|2|3)$/ } } ] 83 } ; 84 85 FCKConfig.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 */ 95 FCKConfig.IndentClasses = [ 'Indent1', 'Indent2', 'Indent3' ] ; 96 97 /** 98 * Paragraph justification. 99 */ 100 FCKConfig.JustifyClasses = [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyFull' ] ; 101 102 /** 103 * Styles combo. 104 */ 105 FCKConfig.StylesXmlPath = '' ; 106 FCKConfig.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 35 35 </h1> 36 36 <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 <font> and <u> elements 39 or the "style" attribute, are avoided. 40 </div> 38 41 <hr /> 39 </div>40 42 <form action="sampleposteddata.asp" method="post" target="_blank"> 41 43 <script type="text/javascript"> … … 54 56 55 57 oFCKeditor.Height = 300 ; 56 oFCKeditor.Value = '<p>This is some <s trong>sample text<\/strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ;58 oFCKeditor.Value = '<p>This is some <span class="Bold">sample text<\/span>. You are using <a href="http://www.fckeditor.net/">FCKeditor<\/a>.<\/p>' ; 57 59 oFCKeditor.Create() ; 58 60 //--> -
FCKeditor/trunk/_samples/html/sample14.styles.css
r830 r932 40 40 a[href] 41 41 { 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. 47 183 */ 48 184 … … 60 196 { 61 197 text-align: center; 62 background-color:Red;63 198 } 64 199 … … 67 202 text-align: justify; 68 203 } 204 205 /** 206 * Other. 207 */ 208 209 code 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 218 kbd 219 { 220 padding: 0px 1px 0px 1px; 221 border-width: 1px 2px 2px 1px; 222 border-style: solid; 223 } 224 225 blockquote 226 { 227 color: #808080; 228 }