summaryrefslogtreecommitdiff
path: root/editor/prosemirror/prosemirror.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-04-08 20:27:36 +0200
committerSébastien Dailly <sebastien@dailly.me>2022-02-07 16:43:33 +0100
commit7d83ee3912582d3435d5a7c5fe4cb8a21617425b (patch)
tree39d374dfa22c7f4092226082c9d1260462cb8a88 /editor/prosemirror/prosemirror.ml
parent210a4d94836d07bb71cad46b3e670c1977cfe833 (diff)
Added custom link popin in text editor
Diffstat (limited to 'editor/prosemirror/prosemirror.ml')
-rwxr-xr-xeditor/prosemirror/prosemirror.ml18
1 files changed, 18 insertions, 0 deletions
diff --git a/editor/prosemirror/prosemirror.ml b/editor/prosemirror/prosemirror.ml
index 8c436a3..2a9b92c 100755
--- a/editor/prosemirror/prosemirror.ml
+++ b/editor/prosemirror/prosemirror.ml
@@ -16,6 +16,24 @@ module Model = struct
include Bindings.Model
+ module Mark = struct
+
+ let _set_from
+ : t -> 'a Js.t -> mark Js.t
+ = fun t element ->
+ let model = Jv.get t "model" in
+ let class_ = Jv.get model "Mark" in
+ Jv.call (Jv.Id.to_jv class_ ) "setFrom" [|Jv.Id.to_jv element |]
+ |> Jv.Id.of_jv
+
+
+ let set_from_mark
+ : t -> mark Js.t -> mark Js.t
+ = _set_from
+
+
+ end
+
module DOMParser = struct