Ticket #2749: InsertAtCursor_Problem.htm

File InsertAtCursor_Problem.htm, 4.5 KB (added by Slava, 15 years ago)

Statis Web page that demonstrates the issue

Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
3<html>
4<head>
5
6        <title>InsertAtCursor with FCKeditor</title>
7
8        <script type="text/javascript" src="../ckeditor/fckeditor.js"></script>
9       
10</head>
11
12<body>
13
14        <script type="text/javascript">
15                function FCKeditor_OnComplete( editorInstance )
16                /* called when FCKeditor is done initializing */
17                {
18                        editorInstance.SetHTML(""); // this is where we can define the initial text to load in FCKeditor
19                }
20
21                function InsertAtFCKCursor(strInsertion) {
22                /* inserts strInsertion at the cursor in FCKeditor; FCKInput is the name given to the editor instance in the declaration */
23
24                        var oEditor = FCKeditorAPI.GetInstance('FCKInput');
25
26                        oEditor.InsertHtml(strInsertion);
27
28                        oEditor.Focus();
29                }
30
31        </script>       
32       
33                <div>
34                        This page, using FCKeditor 2.6.4 and the methods oEditor.InsertHtml(strInsertion) and oEditor.Focus(),
35                        acts differently in IE 7 and Firefox 2 (Windows XP).
36                </div>
37               
38                <div>
39                        To reproduce the issue, follow these steps in each browser:
40                        <ol>
41                                <li>click in the editor</li>
42                                <li>click A, B, C in the alphabet palette, in that order</li>
43                                        <ul>
44                                                <li>in IE, you'll get CAB</li>
45                                                <li>in FF, you'll get ABC</li>
46                                        </ul>
47                                <li>click between A and B to position the insertion point, then click D, E, F in the alphabet palette</li>
48                                        <ul>
49                                                <li>in IE, you'll get FCADEB</li>
50                                                <li>in FF, you'll get ABDEFC</li>
51                                        </ul>
52                        </ol>
53                </div>
54               
55                <div>The behavior in Firefox is what one would expect. In IE, it's a different story. Is there a solution for this?</div>
56               
57                <div>I'd appreciate a response to sp27@cornell.edu.</div>
58               
59                <div name="FreeFormText" id="FreeFormText" style="width: 300px; height: 200px; ">       
60       
61                        <input type="hidden" id="FCKInput" name="FCKInput" value="" style="display:none" />
62                        <input type="hidden" id="FCKInput___Config" value="" style="display:none" />
63                        <iframe id="FCKInput___Frame" src="../ckeditor/editor/fckeditor.html?InstanceName=FCKInput&amp;Toolbar=Basic" width="100%" height="100%" frameborder="0" scrolling="no"></iframe>
64
65                </div> 
66
67       
68                <div>   
69
70                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('A')">&nbsp;A&nbsp;</span>
71                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('B')">&nbsp;B&nbsp;</span>
72                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('C')">&nbsp;C&nbsp;</span>
73                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('D')">&nbsp;D&nbsp;</span>
74                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('E')">&nbsp;E&nbsp;</span>
75                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('F')">&nbsp;F&nbsp;</span>
76                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('G')">&nbsp;G&nbsp;</span>
77                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('H')">&nbsp;H&nbsp;</span>
78                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('I')">&nbsp;I&nbsp;</span>
79                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('J')">&nbsp;J&nbsp;</span>
80                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('K')">&nbsp;K&nbsp;</span>
81                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('L')">&nbsp;L&nbsp;</span>
82                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('M')">&nbsp;M&nbsp;</span>
83                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('N')">&nbsp;N&nbsp;</span>
84                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('O')">&nbsp;O&nbsp;</span>
85                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('P')">&nbsp;P&nbsp;</span>
86                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('Q')">&nbsp;Q&nbsp;</span>
87                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('R')">&nbsp;R&nbsp;</span>
88                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('S')">&nbsp;S&nbsp;</span>
89                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('T')">&nbsp;T&nbsp;</span>
90                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('U')">&nbsp;U&nbsp;</span>
91                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('V')">&nbsp;V&nbsp;</span>
92                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('W')">&nbsp;W&nbsp;</span>
93                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('X')">&nbsp;X&nbsp;</span>
94                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('Y')">&nbsp;Y&nbsp;</span>
95                <span style="cursor: pointer; "onmousedown="InsertAtFCKCursor('Z')">&nbsp;Z&nbsp;</span>
96        </div> 
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy