1 PASS document.queryCommandEnabled('DefaultParagraphSeparator') is true
2 PASS document.queryCommandValue('DefaultParagraphSeparator') is "div"
3 document.execCommand('DefaultParagraphSeparator', false, 'p')
4 PASS document.queryCommandValue('DefaultParagraphSeparator') is "p"
5 document.execCommand('DefaultParagraphSeparator', false, 'br')
6 PASS document.queryCommandValue('DefaultParagraphSeparator') is "p"
7 document.execCommand('DefaultParagraphSeparator', false, 'invalid')
8 PASS document.queryCommandValue('DefaultParagraphSeparator') is "p"
10 Creating paragraphs in the normal way.
11 document.execCommand('InsertText', false, 'a')
12 PASS div.innerHTML is "a"
13 document.execCommand('InsertText', false, '\n')
14 PASS div.innerHTML is "a<p><br></p>"
15 document.execCommand('InsertText', false, 'b')
16 PASS div.innerHTML is "a<p>b</p>"
17 document.execCommand('InsertText', false, '\n')
18 PASS div.innerHTML is "a<p>b</p><p><br></p>"
19 document.execCommand('Delete')
20 PASS div.innerHTML is "a<p>b</p>"
21 document.execCommand('Delete')
22 PASS div.innerHTML is "a<p><br></p>"
23 document.execCommand('Delete')
24 PASS div.innerHTML is "a"
25 document.execCommand('DefaultParagraphSeparator', false, 'div')
26 document.execCommand('InsertParagraph')
27 PASS div.innerHTML is "a<div><br></div>"
30 Using the previous block as template for the new one.
31 document.execCommand('DefaultParagraphSeparator', false, 'p')
32 document.execCommand("InsertHTML", false, "<pre>a</pre>");
33 PASS div.innerHTML is "<pre>a</pre>"
34 document.execCommand('InsertText', false, 'b')
35 PASS div.innerHTML is "<pre>ab</pre>"
36 document.execCommand('InsertText', false, '\n')
37 PASS div.innerHTML is "<pre>ab</pre><pre><br></pre>"
38 document.execCommand('InsertText', false, 'c')
39 PASS div.innerHTML is "<pre>ab</pre><pre>c</pre>"
40 document.execCommand('DefaultParagraphSeparator', false, 'div')
41 document.execCommand('InsertText', false, '\n')
42 PASS div.innerHTML is "<pre>ab</pre><pre>c</pre><pre><br></pre>"
43 document.execCommand('Delete')
44 document.execCommand('InsertParagraph')
45 PASS div.innerHTML is "<pre>ab</pre><pre>c</pre><pre><br></pre>"
47 Breaking out of lists.
49 document.execCommand('DefaultParagraphSeparator', false, 'p')
50 document.execCommand("InsertHTML", false, "<ul><li>a</li></ul>")
51 PASS div.innerHTML is "<ul><li>a</li></ul>"
52 document.execCommand('InsertParagraph')
53 document.execCommand('InsertParagraph')
54 PASS div.innerHTML is "<ul><li>a</li></ul><p><br></p>"
56 Breaking up nested elements.
58 document.execCommand("InsertHTML", false, "<cite>a<cite>bc</cite></cite>")
59 window.getSelection().modify("move", "backward", "character")
60 document.execCommand('InsertParagraph')
61 PASS div.innerHTML is "<cite>a<cite>b</cite></cite><p><cite><cite>c</cite></cite></p>"
62 PASS successfullyParsed is true