1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <title></title> |
---|
5 | <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> |
---|
6 | </head> |
---|
7 | <script language="javascript"> |
---|
8 | |
---|
9 | window.onload = function() |
---|
10 | { |
---|
11 | var oRange = document.selection.createRange() ; |
---|
12 | |
---|
13 | var sNormal ; |
---|
14 | var sFormats = '' ; |
---|
15 | for ( var i = 1 ; i <= 9 ; i++ ) |
---|
16 | { |
---|
17 | oRange.moveToElementText( document.getElementById( 'x' + i ) ) ; |
---|
18 | sFormats += oRange.queryCommandValue( 'FormatBlock' ) ; |
---|
19 | if ( i == 1 ) |
---|
20 | sNormal = sFormats ; |
---|
21 | sFormats += ';' ; |
---|
22 | } |
---|
23 | |
---|
24 | document.getElementById('xFontFormats').innerHTML = sFormats + sNormal + ' (DIV)' ; |
---|
25 | } |
---|
26 | </script> |
---|
27 | <body> |
---|
28 | <table width="70%" align="center"> |
---|
29 | <tr> |
---|
30 | <td> |
---|
31 | <h3>FontFormats Localization</h3> |
---|
32 | <p> |
---|
33 | IE has some limits when handling the "Font Format". It actually uses localized |
---|
34 | strings to retrieve the current format value. This makes it very difficult to |
---|
35 | make a system that works on every single computer in the world. |
---|
36 | </p> |
---|
37 | <p> |
---|
38 | With FCKeditor, this problem impacts in the "Format" toolbar command that |
---|
39 | doesn't reflects the format of the current cursor position. |
---|
40 | </p> |
---|
41 | <p> |
---|
42 | There is only one way to make it work. We must localize FCKeditor using the |
---|
43 | strings used by IE. In this way, we will have the expected behavior at least |
---|
44 | when using FCKeditor in the same language as the browser. So, when localizing |
---|
45 | FCKeditor, go to a computer with IE in the target language, open this page and |
---|
46 | use the following string to the "FontFormats" value: |
---|
47 | </p> |
---|
48 | <div style="white-space: nowrap"> |
---|
49 | FontFormats : "<span id="xFontFormats" style="COLOR: #000099"></span>", |
---|
50 | </div> |
---|
51 | </td> |
---|
52 | </tr> |
---|
53 | </table> |
---|
54 | <div style="DISPLAY: none"> |
---|
55 | <p id="x1"> </p> |
---|
56 | <pre id="x2"> </pre> |
---|
57 | <address id="x3"> </address> |
---|
58 | <h1 id="x4"> </h1> |
---|
59 | <h2 id="x5"> </h2> |
---|
60 | <h3 id="x6"> </h3> |
---|
61 | <h4 id="x7"> </h4> |
---|
62 | <h5 id="x8"> </h5> |
---|
63 | <h6 id="x9"> </h6> |
---|
64 | </div> |
---|
65 | </body> |
---|
66 | </html> |
---|