How to use the prosemirror-test-builder.blockquote 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-model / test / test-replace.js View on Github external
it("can add a split one level up", () =>
       rpl(doc(blockquote(p("foo<a>u"), p("v<b>bar"))),
           doc(blockquote(p("</b></a><b><a>x")), blockquote(p("y<b>"))),
           doc(blockquote(p("foox")), blockquote(p("ybar")))))
</b></a></b>
github ProseMirror / prosemirror-model / test / test-node.js View on Github external
    it("can serialize nested nodes", () => roundTrip(doc(blockquote(ul(li(p("a"), p("b")), li(p(img))), p("c")), p("d"))))
  })
github ProseMirror / prosemirror-transform / test / test-trans.js View on Github external
it("can lift from a nested node", () =&gt;
       lift(doc(blockquote(blockquote(p("&lt;1&gt;one"), p("<a>two"), p("&lt;3&gt;three"), p("<b>four"), p("&lt;5&gt;five")))),
            doc(blockquote(blockquote(p("&lt;1&gt;one")), p("</b></a><b><a>two"), p("&lt;3&gt;three"), p("<b>four"), blockquote(p("&lt;5&gt;five"))))))
</b></a></b>
github ProseMirror / prosemirror-model / test / test-slice.js View on Github external
it("can cut between deeply nested nodes", () =&gt;
       t(doc(blockquote(p("foo<a>bar"), ul(li(p("a")), li(p("b"), "<b>", p("c"))), p("d"))),
         blockquote(p("bar"), ul(li(p("a")), li(p("b")))), 1, 2))
</b></a>
github ProseMirror / prosemirror-view / test / test-decoration.js View on Github external
it("correctly rebuilds a deep structure", () => {
      let {oldSet, set} = buildMap(doc(blockquote(p("foo")), blockquote(blockquote(p("bar")))),
                                   {from: 3, to: 4}, {from: 11, to: 12},
                                   tr => tr.join(7))
      ist(str(oldSet), "[0: [0: [1-2]], 7: [0: [0: [1-2]]]]")
      ist(str(set), "[0: [0: [1-2], 5: [0: [1-2]]]]")
    })
github ProseMirror / prosemirror-transform / test / test-trans.js View on Github external
it("drops an empty node at the end of the slice", () =&gt;
       repl(doc(p("<a>x")),
            doc(p("b</a><a>"), blockquote("<b>", p("hi"))),
            doc(p(), blockquote(p()), p("x"))))
</b></a>
github ProseMirror / prosemirror-view / test / test-domchange.js View on Github external
it("detects an enter press", () =&gt; {
    let enterPressed = false
    let view = tempEditor({
      doc: doc(blockquote(p("foo"), p("<a>"))),
      handleKeyDown: (_view, event) =&gt; { if (event.keyCode == 13) return enterPressed = true }
    })
    let bq = view.dom.querySelector("blockquote")
    bq.appendChild(document.createElement("p"))
    flush(view)
    ist(enterPressed)
  })
</a>
github ProseMirror / prosemirror-transform / test / test-trans.js View on Github external
it("can move an inserted block backward out of parent nodes", () =&gt;
       repl(doc(p("a"), blockquote(p("<a>b"))), hr(), doc(p("a"), blockquote(hr, p("b")))))
  })</a>
github ProseMirror / prosemirror-model / test / test-slice.js View on Github external
it("can cut between deeply nested nodes", () =&gt;
       t(doc(blockquote(p("foo<a>bar"), ul(li(p("a")), li(p("b"), "<b>", p("c"))), p("d"))),
         blockquote(p("bar"), ul(li(p("a")), li(p("b")))), 1, 2))
</b></a>