From da1d9ad1c49f31fc9031fd1bc6661dad3600e40c Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 4 Jun 2021 22:56:27 +0200 Subject: Added markdown output --- editor/prosemirror/bindings.ml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'editor/prosemirror/bindings.ml') diff --git a/editor/prosemirror/bindings.ml b/editor/prosemirror/bindings.ml index 49c0904..7f6d82f 100755 --- a/editor/prosemirror/bindings.ml +++ b/editor/prosemirror/bindings.ml @@ -116,6 +116,9 @@ module Classes = struct class type mark = object ('this) + method _type + : mark_type t readonly_prop + method attrs : 'a TypedObject.t prop @@ -127,7 +130,7 @@ module Classes = struct end - class type node_spec = object ('this) + and node_spec = object ('this) method content : Jstr.t opt prop @@ -258,12 +261,18 @@ module Classes = struct method marks: mark_type t TypedObject.t readonly_prop - method typoNodeType: + method topNodeType: node_type t readonly_prop method text: - Jstr.t -> node t meth + Jstr.t -> mark t js_array t opt -> node t meth + + (** [node t attrs fragment ] Will create a node with the type [t] and + attributes [attrs]. The content will always be a fragment. + You can create a fragment from an array on node with the function + [Model.Fragment.from_array] + *) method node: Jstr.t -> < .. > t opt -> fragment t opt -> mark t js_array t opt -> node t meth @@ -348,7 +357,9 @@ module Classes = struct : (node t -> pos:int -> node t -> bool t) callback -> unit meth method forEach - : (node t -> offset:int -> index:int -> unit) callback -> unit meth + : (node t -> offset:int -> index:int -> unit) callback -> unit meth + (** Call [f] for every child node, passing the node, its offset into + this parent node, and its index. *) end -- cgit v1.2.3