summaryrefslogtreecommitdiff
path: root/editor/prosemirror/bindings.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2022-02-07 15:54:32 +0100
committerSébastien Dailly <sebastien@dailly.me>2022-02-07 16:43:33 +0100
commitf4a59ed2811d4dca2daad58d083078c01488dd11 (patch)
tree85a5ad0e6bf7bdd07834a5cf565d8a5992844f5f /editor/prosemirror/bindings.ml
parentcdd83641518d9b20e81f71e6a30bfe73866df2e8 (diff)
Added prosemirror deps
Diffstat (limited to 'editor/prosemirror/bindings.ml')
-rwxr-xr-xeditor/prosemirror/bindings.ml98
1 files changed, 94 insertions, 4 deletions
diff --git a/editor/prosemirror/bindings.ml b/editor/prosemirror/bindings.ml
index d2ef2e6..08db819 100755
--- a/editor/prosemirror/bindings.ml
+++ b/editor/prosemirror/bindings.ml
@@ -1,14 +1,53 @@
open Js_of_ocaml.Js
+class type ['a] ordered_map = object ('this)
+
+ method get:
+ Jstr.t -> 'a t opt meth
+
+ method update:
+ Jstr.t -> 'a t -> Jstr.t opt -> 'this meth
+
+ method remove:
+ Jstr.t -> 'this meth
+
+ method addToStart:
+ Jstr.t -> 'a t -> 'this meth
+
+ method addToEnd:
+ Jstr.t -> 'a t -> 'this meth
+
+end
+
module Model = struct
type mark
- type schema
+ type node_spec
+
+ type mark_spec
- type content_match
+ class type schema_spec = object ('this)
- type node_spec
+ method nodes:
+ node_spec ordered_map t readonly_prop
+
+ method marks:
+ mark_spec ordered_map t readonly_prop
+
+ method topNode:
+ Jstr.t opt readonly_prop
+
+ end
+
+ class type schema = object ('this)
+
+ method spec:
+ schema_spec t prop
+
+ end
+
+ type content_match
type slice
@@ -43,7 +82,7 @@ module Model = struct
inherit _node_props
method name:
- string readonly_prop
+ Jstr.t readonly_prop
method schema:
schema t readonly_prop
@@ -363,6 +402,57 @@ module View = struct
end
+module SchemaBasic = struct
+
+ class type nodes = object ('this)
+
+ method doc:
+ Model.node_spec t prop
+
+ method paragraph:
+ Model.node_spec t prop
+
+ method blockquote:
+ Model.node_spec t prop
+
+ method horizontal_rule:
+ Model.node_spec t prop
+
+ method heading:
+ Model.node_spec t prop
+
+ method code_block:
+ Model.node_spec t prop
+
+ method text:
+ Model.node_spec t prop
+
+ method image:
+ Model.node_spec t prop
+
+ method hard_break:
+ Model.node_spec t prop
+
+ end
+
+ class type marks = object ('this)
+
+ method link:
+ Model.mark_spec t prop
+
+ method em:
+ Model.mark_spec t prop
+
+ method strong:
+ Model.mark_spec t prop
+
+ method code:
+ Model.mark_spec t prop
+
+ end
+
+end
+
module History = struct
class type history_prop = object ('this)