Given the following (bad) html: <ul><li>one</li><li>two</li>selection</ul>
1. Select the text "selection".
2. execCommand('removeFormat', false, null')
Result: html is "selection" (Where did "one" and "two" go???)
Expected result: <ul><li>one</li><li>two</li>selection</ul> (no change)
Use the provided url for a demo, just click "eval once".
Also seen in Chrome.
Entertainingly if you start with:
<ul><li>one</li><li>two</li>selection</ul>
and hit enter with your cursor just before "selection", then you get:
<ul><li>one</li><li>two</li><ul><br></ul>selection</ul>
I'm not sure what we're supposed to do here. Maybe we're supposed to make the HTML valid before we perform any operations on it?
2010-10-25 14:21 PDT, Ryosuke Niwa