1 <p>This tests to make sure that plaintext-only regions aren't styled if they aren't fully selected. Only <b>foo</b> should be bold below.</p>
2 <div id="div" contenteditable="true"><div id="start">foo</div><table border="1" contenteditable="false"><tr><td>non-editable</td><td contenteditable="plaintext-only"><span id="end">plaintext</span>-only</td></tr></table></div>
5 var start = document.getElementById("start");
6 var end = document.getElementById("end");
7 var selection = window.getSelection();
8 selection.setBaseAndExtent(start, 0, end, end.childNodes.length);
9 document.execCommand("Bold");