Ticket #4961: test_safari.html

File test_safari.html, 1.5 KB (added by wxu, 10 years ago)

put the file in the same folder as the other samples

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5        <title>Sample - CKEditor</title>
6        <meta content="text/html; charset=utf-8" http-equiv="content-type"/>
7        <script type="text/javascript" src="../ckeditor.js"></script>
8</head>
9
10<body>
11<pre>
12insert html lost current selection under safari. it works under chrome, firefox, but doesn't work under safari.
13Steps to reproduce using safari:
14 1. open this test file
15 2. click any position in the editor
16 3. click safari address bar or search input box on the top
17 4. click execute button
18 5. it will insert the image at the beginning.
19</pre>
20
21<p>
22<textarea id="commands" cols="100" rows="8" name="commands" rows="5">
23try{
24        var oEditor=CKEDITOR.instances.htmlEditor;
25        oEditor.focus();
26        oEditor.insertHtml("<img src='http://www.google.com/images/nav_logo7.png'>");
27        oEditor.fire( 'saveSnapshot' );
28} catch(e){ e.toString(); }     
29</textarea>
30<input name="execute" type="button" value="Execute" onClick="return eval(document.getElementById('commands').value);"/>
31</p>
32
33<p>
34        <textarea cols="80" id="htmlEditor" name="htmlEditor" rows="10">&lt;p&gt;This is some &lt;strong&gt;sample text&lt;/strong&gt;. You are using &lt;a href="http://ckeditor.com/"&gt;CKEditor&lt;/a&gt;.&lt;/p&gt;</textarea>
35        <script type="text/javascript">
36        //<![CDATA[
37                CKEDITOR.replace( 'htmlEditor' );
38        //]]>
39        </script>
40</p>
41</body>
42</html>
© 2003 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy