ref: master
public/javascripts/tinymce/tests/manual/resize.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 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
<!DOCTYPE html> <html> <head> <title>Resize logic manual tests</title> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <script src="../../js/tinymce/tinymce.dev.js"></script> <script src="../../js/tinymce/plugins/table/plugin.dev.js"></script> <script> tinymce.init({ selector: "textarea", add_unload_trigger: false, plugins: "media code table contextmenu", content_css: 'css/development.css', //object_resizing: false, init_instance_callback: function(ed) { ed.on('ObjectSelected ObjectResizeStart ObjectResized', function(e) { if (window.console) { console.log(e.type, e.target, e.width, e.height); } }); }, content_style: ( 'div {margin: 10px; border: 5px solid red; padding: 3px}' + 'body.mce-content-body div.mce-resizehandle {background:red}' ) }); tinymce.init({ selector: "#inline", inline: true, add_unload_trigger: false, plugins: "media code table contextmenu", content_css: 'css/development.css', //object_resizing: false, init_instance_callback: function(ed) { ed.on('ObjectSelected ObjectResizeStart ObjectResized', function(e) { if (window.console) { console.log(e.type, e.target, e.width, e.height); } }); }, content_style: ( 'div {margin: 10px; border: 5px solid red; padding: 3px}' + 'div.mce-content-body div.mce-resizehandle {background:red}' ) }); function select(id, selector, idx) { tinymce.get(id).selection.select(tinymce.get(id).dom.select(selector)[idx]); tinymce.get(id).nodeChanged(); return false; } </script> <style> .mce-tinymce .mce-iframe { height: 600px; } </style> </head> <body> <textarea id="iframe" style="width: 100%; height: 500px;"> <h3>Images</h3> <h4>Auto size</h4> <img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" /> <h4>Style size</h4> <img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" style="width: 100px; height: 100px" /> <h4>Attr size</h4> <img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" width="100" height="100" /> <h4>Mixed attr/style size</h4> <img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" width="100" style="height:100px" /> <h4>Margin and border</h4> <img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" style="margin: 10px; border: 5px solid red" /> <h4>Margin and border in div</h4> <div><img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" style="margin: 10px; border: 5px solid red" /></div> <h4>Float right</h4> <img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" style="float: right" /> <h3>Tables</h3> <h4>Auto size</h4> <table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h4>Style size</h4> <table style="width: 100px; height: 100px"><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h4>Attr size</h4> <table width="100" height="100"><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h4>Mixed attr/style size</h4> <table width="100" style="height:100px"><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h4>Margin and border</h4> <table style="margin: 10px; border: 5px solid red"><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h4>Table with image inside</h4> <table><tr><td>1</td><td>2</td></tr><tr><td><img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" style="margin: 10px; border: 5px solid red" /></td><td>4</td></tr></table> <h4>Float right</h4> <table style="float: right"><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h4>Table in table</h4> <table><tr><td><table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table></td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h4>Table with caption</h4> <table><caption>C</caption><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h3>Other objects</h3> <h4>Auto size</h4> <object></object> <h4>Style size</h4> <object style="width: 100px; height: 100px"></object> <h4>Attr size</h4> <object width="100" height="100"></object> <h4>Mixed attr/style size</h4> <object width="100" style="height:100px"></object> <h4>HR element</h4> <hr width="100" style="height:100px" /> <h4>Edge case on IE</h4> <div style="width: 100px; height: 100px; border: 1px solid red">DIV</div> </textarea> <a href="#" onclick="return select('iframe', 'img', 0);">[Select image 1]</a> <a href="#" onclick="return select('iframe', 'img', 1);">[Select image 2]</a> <div id="inline" style="height: 200px; overflow: auto"> <h3>Images</h3> <h4>Auto size</h4> <img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" /> <h4>Style size</h4> <img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" style="width: 100px; height: 100px" /> <h4>Attr size</h4> <img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" width="100" height="100" /> <h4>Mixed attr/style size</h4> <img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" width="100" style="height:100px" /> <h4>Margin and border</h4> <img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" style="margin: 10px; border: 5px solid red" /> <h4>Margin and border in div</h4> <div><img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" style="margin: 10px; border: 5px solid red" /></div> <h4>Float right</h4> <img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" style="float: right" /> <h3>Tables</h3> <h4>Auto size</h4> <table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h4>Style size</h4> <table style="width: 100px; height: 100px"><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h4>Attr size</h4> <table width="100" height="100"><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h4>Mixed attr/style size</h4> <table width="100" style="height:100px"><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h4>Margin and border</h4> <table style="margin: 10px; border: 5px solid red"><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h4>Table with image inside</h4> <table><tr><td>1</td><td>2</td></tr><tr><td><img src="data:image/gif;base64,R0lGODlhIAAgAIAAAGB7/wAAACH5BAAAAAAALAAAAAAgACAAAAIehI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC5sFADs=" style="margin: 10px; border: 5px solid red" /></td><td>4</td></tr></table> <h4>Float right</h4> <table style="float: right"><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h4>Table in table</h4> <table><tr><td><table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table></td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table> <h3>Other objects</h3> <h4>Auto size</h4> <object></object> <h4>Style size</h4> <object style="width: 100px; height: 100px"></object> <h4>Attr size</h4> <object width="100" height="100"></object> <h4>Mixed attr/style size</h4> <object width="100" style="height:100px"></object> <h4>HR element</h4> <hr width="100" style="height:100px" /> <h4>Edge case on IE</h4> <div style="width: 100px; height: 100px; border: 1px solid red">DIV</div> </div> <a href="#" onclick="return select('inline', 'img', 0);">[Select image 1]</a> <a href="#" onclick="return select('inline', 'img', 1);">[Select image 2]</a> </body> </html> |