aboutsummaryrefslogtreecommitdiff
path: root/editor/prosemirror/prosemirror.mli
diff options
context:
space:
mode:
Diffstat (limited to 'editor/prosemirror/prosemirror.mli')
-rwxr-xr-xeditor/prosemirror/prosemirror.mli56
1 files changed, 53 insertions, 3 deletions
diff --git a/editor/prosemirror/prosemirror.mli b/editor/prosemirror/prosemirror.mli
index aa27bf4..a4c5d35 100755
--- a/editor/prosemirror/prosemirror.mli
+++ b/editor/prosemirror/prosemirror.mli
@@ -6,6 +6,8 @@ type t
val v
: unit -> t
+module O = Bindings.TypedObject
+
module rec Model : sig
include module type of Bindings.Model
@@ -34,6 +36,24 @@ module rec Model : sig
val empty_fragment
: t -> fragment Js.t
+ module Dom_output_spec : sig
+
+ val v
+ : ?attrs:< .. > -> string -> domOutputSpec Js.t list -> domOutputSpec Js.t
+
+ (** Hole element inside an output_spec element *)
+ val hole
+ : domOutputSpec Js.t
+
+ val of_el
+ : Brr.El.t -> domOutputSpec Js.t
+
+ val of_jstr
+ : Jstr.t -> domOutputSpec Js.t
+
+ val of_obj
+ : < dom: node Js.t Js.readonly_prop ; contentDOM : node Js.t Js.opt Js.readonly_prop > Js.t -> domOutputSpec Js.t
+ end
end
@@ -62,6 +82,24 @@ and State : sig
val fromJSON
: t -> configuration_prop Js.t -> Brr.Json.t -> editor_state Js.t
+ val selection_to
+ : selection Js.t -> Model.resolved_pos Js.t
+
+ val selection_at_start
+ : t-> Model.node Js.t -> selection Js.t
+
+ val is_selectable
+ : t -> Model.node Js.t -> bool Js.t
+
+ val node_selection
+ : t -> Model.resolved_pos Js.t -> node_selection Js.t
+
+ val create_node_selection
+ : t -> Model.node Js.t -> int -> node_selection Js.t
+
+ val create_text_selection
+ : t -> Model.node Js.t -> int -> text_selection Js.t
+
end
(* Editor view *)
@@ -91,6 +129,10 @@ module SchemaBasic : sig
val schema
: t -> Model.schema Js.t
+ val nodes
+ : t -> nodes Js.t
+
+
end
module History : sig
@@ -113,7 +155,7 @@ end
module Keymap : sig
val keymap
- : t -> (string * (State.editor_state Js.t -> (State.transaction -> unit) -> bool)) array -> State.plugin Js.t
+ : t -> (string * (State.editor_state Js.t -> (State.transaction Js.t -> unit) -> bool)) array -> State.plugin Js.t
end
@@ -126,5 +168,13 @@ end
(* Example Setup *)
-val example_setup
- : t -> Model.schema Js.t -> State.plugin Js.t Js.js_array Js.t
+module Example : sig
+
+ include module type of Bindings.Example
+
+ val options
+ : Model.schema Js.t -> options Js.t
+
+ val example_setup
+ : t -> options Js.t -> State.plugin Js.t Js.js_array Js.t
+end