diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-02-14 19:32:36 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 16:43:33 +0100 |
commit | e612a344629b999e90089710646e7a0bc68597d2 (patch) | |
tree | 8670b44572b827d251d13b0a3a8d65cdc3ddfd78 /editor/prosemirror/prosemirror.mli | |
parent | f4a59ed2811d4dca2daad58d083078c01488dd11 (diff) |
Update prosemirror
Diffstat (limited to 'editor/prosemirror/prosemirror.mli')
-rwxr-xr-x | editor/prosemirror/prosemirror.mli | 56 |
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 |