| <p id="description">This tests inserting a text in the middle of a text node. You should see "1 Two 3" below.</p>
|
| <pre id="test" contentEditable="true" style="border:1px solid black">
|
| <script src="../../resources/dump-as-markup.js"></script>
|
| getSelection().selectAllChildren(document.querySelector('i'));
|
| var text = document.querySelector('i').firstChild;
|
| getSelection().setBaseAndExtent(text, 0, text, 1);
|
| document.execCommand('InsertHtml', false, 'Two');
|
| Markup.description(document.getElementById('description').textContent);
|