How to use the prosemirror-test-builder.ol function in prosemirror-test-builder

To help you get started, we’ve selected a few prosemirror-test-builder examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ProseMirror / prosemirror-transform / test / test-trans.js View on Github external
it("can join lists", () =>
       join(doc(ol(li(p("one")), li(p("two"))), "<a>", ol(li(p("three")))),
            doc(ol(li(p("one")), li(p("two")), "</a><a>", li(p("three"))))))
</a>
github ProseMirror / prosemirror-commands / test / test-commands.js View on Github external
it("doesn't split the parent block when at the start", () =&gt;
     apply(doc(ol("<a>", li(p("a")), li(p("b")), li(p("c")))), splitBlock, null))
</a>
github ProseMirror / prosemirror-transform / test / test-trans.js View on Github external
it("can close nested parent nodes", () =&gt;
       repl(doc(blockquote(blockquote(p("one"), p("tw<a>o"), p("t<b>hree&lt;3&gt;"), p("four&lt;4&gt;")))),
            doc(ol(li(p("hello</b></a><b><a>world")), li(p("bye"))), p("ne<b>xt")),
            doc(blockquote(blockquote(p("one"), p("tw</b></a><b><a>world"), ol(li(p("bye"))), p("ne<b>hree&lt;3&gt;"), p("four&lt;4&gt;"))))))
</b></a></b></b>
github ProseMirror / prosemirror-transform / test / test-trans.js View on Github external
it("can split a list item", () =&gt;
       split(doc(ol(li(p("one&lt;1&gt;")), li(p("two<a>three")), li(p("four&lt;2&gt;")))),
             doc(ol(li(p("one&lt;1&gt;")), li(p("two")), li(p("</a><a>three")), li(p("four&lt;2&gt;")))),
             2))
</a>
github ProseMirror / prosemirror-model / test / test-dom.js View on Github external
it("understands double slashes in context restrictions", () =&gt; {
      ist(contextParser("blockquote//list_item/")
          .parse(domFrom("<blockquote><ol><li><p>a</p></li></ol></blockquote>")),
          doc(blockquote(ol(li(p("a"), hr)))), eq)
    })
github ProseMirror / prosemirror-transform / test / test-trans.js View on Github external
it("can wrap in a nested list", () =&gt;
       wrap(doc(ol(li(p("&lt;1&gt;one")), li(p("..."), p("<a>two"), p("<b>three")), li(p("&lt;4&gt;four")))),
            doc(ol(li(p("&lt;1&gt;one")), li(p("..."), ol(li(p("</b></a><b><a>two"), p("<b>three")))), li(p("&lt;4&gt;four")))),
            "ordered_list"))
</b></a></b>
github ProseMirror / prosemirror-model / test / test-dom.js View on Github external
it("understands pipes in context restrictions", () =&gt; {
      ist(contextParser("list_item/|blockquote/")
          .parse(domFrom("<blockquote><p></p></blockquote><ol><li><p>a</p></li></ol>")),
          doc(blockquote(p(), hr), ol(li(p("a"), hr))), eq)
    })
github ProseMirror / prosemirror-transform / test / test-trans.js View on Github external
it("will match open list items", () =&gt;
       repl(doc(ol(li(p("one<a>")), li(p("three")))),
            doc(ol(li(p("</a><a>half")), li(p("two")), "<b>")),
            doc(ol(li(p("onehalf")), li(p("two")), li(p()), li(p("three"))))))
</b></a>
github ProseMirror / prosemirror-commands / test / test-commands.js View on Github external
it("splits a parent block when a node is selected", () =&gt;
     apply(doc(ol(li(p("a")), "<a>", li(p("b")), li(p("c")))), splitBlock,
           doc(ol(li(p("a"))), ol(li(p("b")), li(p("c"))))))
</a>