aboutsummaryrefslogtreecommitdiff
path: root/editor/prosemirror/bindings.ml
diff options
context:
space:
mode:
Diffstat (limited to 'editor/prosemirror/bindings.ml')
-rwxr-xr-xeditor/prosemirror/bindings.ml19
1 files changed, 15 insertions, 4 deletions
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