1 | <html> |
---|
2 | <head> |
---|
3 | <title data-cke-title="test">test</title> |
---|
4 | <script type="text/javascript"> |
---|
5 | var content = "<html dir='ltr'><head><title data-cke-title='test'>test</title></head><body contentEditable='false' unselectable='on' style='height:200px;width:400px;'><div style='border:1px solid black; margin-bottom:10px;'>Read only.</div><div style='border:1px solid black; margin-bottom:10px;' contentEditable='true'>Editable(select this) (right click over here)</div><p>Attempting to right click outside of the selection moves the cursor in this standalone test. When trying the same workflow in CKEditor the selection persists and the cursor is not moved.</p></body></html>"; |
---|
6 | |
---|
7 | function loadFrame(){ |
---|
8 | var testframe = document.getElementById('testframe'); |
---|
9 | var doc = testframe.document; |
---|
10 | if(testframe.contentDocument) |
---|
11 | doc = testframe.contentDocument; //NS6 |
---|
12 | else if(testframe.contentWindow) |
---|
13 | doc = testframe.contentWindow.document; //IE5 IE6 |
---|
14 | doc.open(); |
---|
15 | doc.writeln(content); |
---|
16 | doc.close(); |
---|
17 | } |
---|
18 | </script> |
---|
19 | </head> |
---|
20 | <body onload="loadFrame()"> |
---|
21 | <iframe id="testframe" frameborder="1" tabindex="0" src="" title="test" style="width:700px;height:400px"> |
---|
22 | |
---|
23 | </iframe> |
---|
24 | </body> |
---|
25 | </html> |
---|