Vz_doc.DocDocument.
Documents are built by sequences of toplevel definition which are eventually rendered by a Doc.render.
val input : ('a * Input.t) -> 'ainput (_, i) appends input i at that point. It is recommended to apply this as a posfix via the ( |> ) operator. For example:
let checkme = Input.bool ~init:false (`Txt "Check me!") |> Doc.inputval output : Output.t -> unitoutput o appends output o at that point. It is recommended to apply this as postfix operator via the ( |> ) operator. For example:
let () = Output.image image |> Doc.outputmd s appends s as CommonMark text. This is meant to be used directly as a toplevel expression as follows:
;; Doc.md {|
… Write *CommonMark* here.
|}render ?root ?css () renders the document definition:
root is the element to which the definitions are appended to. Defaults to the Brr.Document.body of Brr.G.document.css is true (default) the default css is added as the first child.Note that this flushes the document buffer, a new document can be rendered aftewards.