OLD | NEW |
1 <textarea id='id_message'> | 1 <textarea id='id_message'> |
2 </textarea> | 2 </textarea> |
3 | 3 |
4 <object id="plugin" | 4 <object id="plugin" |
5 tabindex="0" | 5 tabindex="0" |
6 type="application/browser-plugin" | 6 type="application/browser-plugin" |
7 width="240" | 7 width="240" |
8 height="120" | 8 height="120" |
9 style='border: solid 1px red' | 9 style='border: solid 1px red' |
10 contentEditable | |
11 > | 10 > |
12 </object> | 11 </object> |
13 | 12 |
14 <script> | 13 <script> |
15 function dragLocation() { | 14 function dragLocation() { |
16 return [id_message.offsetLeft + id_message.offsetWidth / 2, | 15 return [id_message.offsetLeft + id_message.offsetWidth / 2, |
17 id_message.offsetTop + id_message.offsetHeight / 2]; | 16 id_message.offsetTop + id_message.offsetHeight / 2]; |
18 } | 17 } |
19 | 18 |
20 function dropLocation() { | 19 function dropLocation() { |
21 return [plugin.offsetLeft + plugin.offsetWidth / 2, | 20 return [plugin.offsetLeft + plugin.offsetWidth / 2, |
22 plugin.offsetTop + plugin.offsetHeight / 2]; | 21 plugin.offsetTop + plugin.offsetHeight / 2]; |
23 } | 22 } |
24 | 23 |
25 function SetSrc(src) { | 24 function SetSrc(src) { |
26 plugin = document.getElementById('plugin'); | 25 plugin = document.getElementById('plugin'); |
27 plugin.src = src; | 26 plugin.src = src; |
28 } | 27 } |
29 </script> | 28 </script> |
OLD | NEW |