4 <script type=
"application/javascript">
5 document.designMode = 'on';
7 let div = document.createElement('div');
8 let p = document.createElement('p');
9 document.documentElement.appendChild(div);
10 document.documentElement.appendChild(
11 document.createElement('body'));
12 document.documentElement.appendChild(p);
13 document.execCommand('insertimage', false, 'http://localhost/');
14 document.execCommand('insertparagraph', false, null);
16 document.elementFromPoint(
0,
0);
18 let selection = window.getSelection();
19 selection.modify('extend', 'forward', 'character');
21 let range = document.createRange();
23 selection.addRange(range);
24 range.setStart(div,
0);
26 range = document.createRange();
28 selection.addRange(range);
30 document.execCommand('delete', false, null);