1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
---|
2 | <!-- |
---|
3 | * FCKeditor - The text editor for Internet - http://www.fckeditor.net |
---|
4 | * Copyright (C) 2003-2007 Frederico Caldeira Knabben |
---|
5 | * |
---|
6 | * == BEGIN LICENSE == |
---|
7 | * |
---|
8 | * Licensed under the terms of any of the following licenses at your |
---|
9 | * choice: |
---|
10 | * |
---|
11 | * - GNU General Public License Version 2 or later (the "GPL") |
---|
12 | * http://www.gnu.org/licenses/gpl.html |
---|
13 | * |
---|
14 | * - GNU Lesser General Public License Version 2.1 or later (the "LGPL") |
---|
15 | * http://www.gnu.org/licenses/lgpl.html |
---|
16 | * |
---|
17 | * - Mozilla Public License Version 1.1 or later (the "MPL") |
---|
18 | * http://www.mozilla.org/MPL/MPL-1.1.html |
---|
19 | * |
---|
20 | * == END LICENSE == |
---|
21 | --> |
---|
22 | <html> |
---|
23 | <head> |
---|
24 | <title></title> |
---|
25 | </head> |
---|
26 | <script language="javascript"> |
---|
27 | |
---|
28 | window.onload = function() |
---|
29 | { |
---|
30 | var oRange = document.selection.createRange() ; |
---|
31 | |
---|
32 | var sNormal ; |
---|
33 | var sFormats = '' ; |
---|
34 | for ( var i = 1 ; i <= 9 ; i++ ) |
---|
35 | { |
---|
36 | oRange.moveToElementText( document.getElementById( 'x' + i ) ) ; |
---|
37 | sFormats += oRange.queryCommandValue( 'FormatBlock' ) ; |
---|
38 | if ( i == 1 ) |
---|
39 | sNormal = sFormats ; |
---|
40 | sFormats += ';' ; |
---|
41 | } |
---|
42 | |
---|
43 | document.getElementById('xFontFormats').innerHTML = sFormats + sNormal + ' (DIV)' ; |
---|
44 | } |
---|
45 | </script> |
---|
46 | <body> |
---|
47 | <table width="70%" align="center"> |
---|
48 | <tr> |
---|
49 | <td> |
---|
50 | <h3>FontFormats Localization</h3> |
---|
51 | <p> |
---|
52 | IE has some limits when handling the "Font Format". It actually uses localized |
---|
53 | strings to retrieve the current format value. This makes it very difficult to |
---|
54 | make a system that works on every single computer in the world. |
---|
55 | </p> |
---|
56 | <p> |
---|
57 | With FCKeditor, this problem impacts in the "Format" toolbar command that |
---|
58 | doesn't reflects the format of the current cursor position. |
---|
59 | </p> |
---|
60 | <p> |
---|
61 | There is only one way to make it work. We must localize FCKeditor using the |
---|
62 | strings used by IE. In this way, we will have the expected behavior at least |
---|
63 | when using FCKeditor in the same language as the browser. So, when localizing |
---|
64 | FCKeditor, go to a computer with IE in the target language, open this page and |
---|
65 | use the following string to the "FontFormats" value: |
---|
66 | </p> |
---|
67 | <div style="white-space: nowrap"> |
---|
68 | FontFormats : "<span id="xFontFormats" style="COLOR: #000099"></span>", |
---|
69 | </div> |
---|
70 | </td> |
---|
71 | </tr> |
---|
72 | </table> |
---|
73 | <div style="DISPLAY: none"> |
---|
74 | <p id="x1"> </p> |
---|
75 | <pre id="x2"> </pre> |
---|
76 | <address id="x3"> </address> |
---|
77 | <h1 id="x4"> </h1> |
---|
78 | <h2 id="x5"> </h2> |
---|
79 | <h3 id="x6"> </h3> |
---|
80 | <h4 id="x7"> </h4> |
---|
81 | <h5 id="x8"> </h5> |
---|
82 | <h6 id="x9"> </h6> |
---|
83 | </div> |
---|
84 | </body> |
---|
85 | </html> |
---|