aboutsummaryrefslogtreecommitdiff
path: root/editor/prosemirror/prosemirror.mli
diff options
context:
space:
mode:
Diffstat (limited to 'editor/prosemirror/prosemirror.mli')
-rwxr-xr-xeditor/prosemirror/prosemirror.mli67
1 files changed, 26 insertions, 41 deletions
diff --git a/editor/prosemirror/prosemirror.mli b/editor/prosemirror/prosemirror.mli
index 1e0e889..aa27bf4 100755
--- a/editor/prosemirror/prosemirror.mli
+++ b/editor/prosemirror/prosemirror.mli
@@ -6,65 +6,41 @@ type t
val v
: unit -> t
-type schema_list
-
-type pm_schema
-
-type pm_state
-
-type pm_view
-
-type pm_model
-
-type pm_transform
-
-val state
- : (t, pm_state) J.prop
-
-val view
- : (t, pm_view) J.prop
-
-val model
- : (t, pm_model) J.prop
-
-type schema
-
-val schema_basic
- : (t, Jv.t) J.prop
-
-val schema_list
- : (t, schema_list) J.prop
-
-
-val transform
- : (t, pm_transform) J.prop
-
-
module rec Model : sig
include module type of Bindings.Model
+ val schema_spec:
+ node_spec Bindings.ordered_map Js.t
+ -> mark_spec Bindings.ordered_map Js.t option
+ -> string option
+ -> schema_spec Js.t
+
+ val schema
+ : t -> schema_spec Js.t -> schema Js.t
module DOMParser : sig
- type t
+
+ type parser
val from_schema
- : pm_model -> schema Js.t -> t
+ : t -> schema Js.t -> parser
val parse
- : t -> El.t -> node Js.t
+ : parser -> El.t -> node Js.t
end
val empty_fragment
: t -> fragment Js.t
+
end
and SchemaList : sig
val add_list_nodes
- : schema_list -> ?listGroup:string -> node:Model.node Js.t -> itemContent:string -> unit
+ : t -> Model.node_spec Bindings.ordered_map Js.t -> Jstr.t -> Jstr.t option -> Model.node_spec Bindings.ordered_map Js.t
end
@@ -81,10 +57,10 @@ and State : sig
: unit -> creation_prop Js.t
val create
- : pm_state -> creation_prop Js.t -> editor_state Js.t
+ : t -> creation_prop Js.t -> editor_state Js.t
val fromJSON
- : pm_state -> configuration_prop Js.t -> Brr.Json.t -> editor_state Js.t
+ : t -> configuration_prop Js.t -> Brr.Json.t -> editor_state Js.t
end
@@ -104,7 +80,16 @@ and View : sig
: unit -> direct_editor_props Js.t
val editor_view
- : pm_view -> El.t -> direct_editor_props Js.t -> editor_view Js.t
+ : t -> El.t -> direct_editor_props Js.t -> editor_view Js.t
+
+end
+
+module SchemaBasic : sig
+
+ include module type of Bindings.SchemaBasic
+
+ val schema
+ : t -> Model.schema Js.t
end