aboutsummaryrefslogtreecommitdiff
path: root/editor/prosemirror/bindings.ml
diff options
context:
space:
mode:
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)