Module Quill.Doc
Notebook documents.
A document is an ordered sequence of Cell.t values. Operations maintain cell ordering and identity.
Documents
val empty : unit -> tempty () is a document with no cells.
of_cells ?metadata cs is a document containing cs in order with the given metadata (defaults to []).
Accessors
val length : t -> intlength d is the number of cells in d.
val metadata : t -> (string * string) listmetadata d is the document-level metadata of d.
set_metadata m d is d with metadata replaced by m.
Modifications
insert ~pos c d inserts c at position pos. Cells at pos and beyond shift right. pos is clamped to [0, length d].
remove id d removes the cell with identifier id from d. Returns d unchanged if id is not found.
replace id c d replaces the cell identified by id with c. Returns d unchanged if id is not found.
update id f d applies f to the cell identified by id.