diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-31 04:21:01 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 16:43:33 +0100 |
commit | d17d17261faccb3eb42e91f88ca035e5b1730c66 (patch) | |
tree | 28424d286bda347aee77528ece79907026b2e35b /editor/quill.mli | |
parent | 1961a9779b482cf9cbdb3365137c2e74423067c6 (diff) |
Bindings to prosemirror
Diffstat (limited to 'editor/quill.mli')
-rwxr-xr-x | editor/quill.mli | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/editor/quill.mli b/editor/quill.mli new file mode 100755 index 0000000..7405102 --- /dev/null +++ b/editor/quill.mli @@ -0,0 +1,70 @@ +open Brr + +(** Constructor options *) +type options + +val options + : unit -> options + +val bounds + : (options, El.t) J.prop + +val debug + : (options, Jstr.t) J.prop + +val placeholder + : (options, Jstr.t) J.prop + +val readonly + : (options, Jstr.t) J.prop + +val theme + : (options, Jstr.t) J.prop + +val scrollingContainer + : (options, El.t) J.prop + +type delta + +val delta_to_json + : delta -> Json.t + +val delta_of_json + : Json.t -> delta + +type operations + +val ops + : (delta, operations) J.prop + +type t + +(** Constructor. + + [quill element] will create the editor inside the given element + +*) +val quill + : ?options:options -> El.t -> (t, Jv.Error.t) Result.t + + +(** Return the editor content *) +val get_contents + : t -> delta + +val set_contents + : t -> delta -> unit + +(** [extract_content t index length] return the content starting from index, + with length elements *) +val extract_contents + : t -> int -> int -> delta + +val on_text_change + : t -> (string -> string -> string -> unit) -> unit + +(* [update_contents t delta] replace the content with the commands given + by delta. +*) +val update_contents + : t -> delta -> delta |