| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | <head> |
| 4 | <title>Plugin: selection</title> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 6 | <link rel="stylesheet" type="text/css" href="../../test.css" /> |
| 7 | <script type="text/javascript" src="../../../../ckeditor_source.js"></script> |
| 8 | <script type="text/javascript" src="../../test.js"></script> |
| 9 | <script type="text/javascript"> |
| 10 | //<![CDATA[ |
| 11 | CKEDITOR.plugins.load( [ 'selection' ] ); |
| 12 | //]]> |
| 13 | </script> |
| 14 | <script type="text/javascript"> |
| 15 | //<![CDATA[ |
| 16 | CKEDITOR.test.addTestCase( (function() |
| 17 | { |
| 18 | var assert = CKEDITOR.test.assert; |
| 19 | var doc = new CKEDITOR.dom.document( document ); |
| 20 | |
| 21 | return { |
| 22 | test_selection_ie : function() |
| 23 | { |
| 24 | if ( !CKEDITOR.env.ie ) |
| 25 | return; |
| 26 | |
| 27 | var $range = document.body.createTextRange(); |
| 28 | $range.findText( 'This' ); |
| 29 | $range.select(); |
| 30 | |
| 31 | var range = doc.getSelection().getRanges()[ 0 ]; |
| 32 | range.select(); |
| 33 | |
| 34 | var $range2 = document.selection.createRange(); |
| 35 | assert.areSame( 0, $range.compareEndPoints( 'StartToStart', $range2 ), 'StartToStart' ); |
| 36 | assert.areSame( 0, $range.compareEndPoints( 'EndToEnd', $range2 ), 'EndToEnd' ); |
| 37 | }, |
| 38 | |
| 39 | name : document.title |
| 40 | }; |
| 41 | })()); |
| 42 | //]]> |
| 43 | </script> |
| 44 | </head> |
| 45 | <body> |
| 46 | <p> |
| 47 | This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">CKEditor</a>.</p> |
| 48 | </body> |
| 49 | </html> |