ref: master
public/javascripts/tinymce/tests/manual/gecko_caret.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
<!DOCTYPE html> <html> <head> <title>Gecko caret tests</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <script src="../../js/tinymce/tinymce.dev.js"></script> <script> function init() { tinymce.init({ mode: "textareas", plugins: [ "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker", "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking", "save table contextmenu directionality emoticons template paste" ], valid_elements: '*[*]', add_unload_trigger : false, editor_selector : 'editable', content_css: 'css/gecko_caret.css' }); } function reInit10x() { tinymce.execCommand('mceRemoveEditor', false, 'elm3'); for (var i = 0; i < 10; i++) { tinymce.execCommand('mceRemoveEditor', false, 'elm3'); tinymce.execCommand('mceAddEditor', false, 'elm3'); } } init(); </script> </head> <body> <form method="post" action="http://www.tinymce.com/dump.php?example=true"> <div> <h3>Visible editor</h3> <div> <div id="container1"> <textarea id="elm1" name="elm1" rows="7" cols="80" style="width: 80%" class="editable"> <p> This is some text that can be edited. <b contenteditable="false">This is some text that isn't <em contenteditable="true">editable</em>.....</b> </p> <p> Another paragraph. </p> <table> <tr><td>Cell</td></tr> </table> </textarea> </div> <a href="#" onclick="tinymce.DOM.show('container1');return false;">[Show]</a> <a href="#" onclick="tinymce.DOM.hide('container1');return false;">[Hide]</a> </div> <h3>Invisible editor</h3> <div> <div id="container2" style="display: none"> <textarea id="elm2" name="elm2" rows="7" cols="80" style="width: 80%" class="editable"> <p> This is some text that can be edited. <b contenteditable="false">This is some text that isn't <em contenteditable="true">editable</em>.....</b> </p> <p> Another paragraph. </p> <table> <tr><td>Cell</td></tr> </table> </textarea> </div> <a href="#" onclick="tinymce.DOM.show('container2');return false;">[Show]</a> <a href="#" onclick="tinymce.DOM.hide('container2');return false;">[Hide]</a> </div> <h3>On demand editor</h3> <div> <div id="container3"> <textarea id="elm3" name="elm3" rows="7" cols="80" style="width: 80%"> <p> This is some text that can be edited. <b contenteditable="false">This is some text that isn't <em contenteditable="true">editable</em>.....</b> </p> <p> Another paragraph. </p> <table> <tr><td>Cell</td></tr> </table> </textarea> </div> <a href="#" onclick="tinymce.execCommand('mceAddEditor', false, 'elm3');return false;">[Init]</a> <a href="#" onclick="tinymce.DOM.show('container3');return false;">[Show]</a> <a href="#" onclick="tinymce.DOM.hide('container3');return false;">[Hide]</a> <a href="#" onclick="tinymce.execCommand('mceRemoveEditor', false, 'elm3');return false;">[Remove]</a> <a href="#" onclick="reInit10x();return false;">[Re-init 10x]</a> </div> </div> </form> </body> </html> |