diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-02-15 23:03:21 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 16:43:33 +0100 |
commit | 274789e733c46e7e20fc1dc918a7251b0206b3d2 (patch) | |
tree | d8f07ef584765dd178cc1c3cfa2ef925ffaa636b /editor/prosemirror/prosemirror.mli | |
parent | e612a344629b999e90089710646e7a0bc68597d2 (diff) |
Working key handler
Diffstat (limited to 'editor/prosemirror/prosemirror.mli')
-rwxr-xr-x | editor/prosemirror/prosemirror.mli | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/editor/prosemirror/prosemirror.mli b/editor/prosemirror/prosemirror.mli index a4c5d35..7a723d3 100755 --- a/editor/prosemirror/prosemirror.mli +++ b/editor/prosemirror/prosemirror.mli @@ -100,6 +100,10 @@ and State : sig val create_text_selection : t -> Model.node Js.t -> int -> text_selection Js.t + type dispatch = (transaction Js.t -> unit) + + type command = editor_state Js.t -> dispatch Js.opt -> bool Js.t + end (* Editor view *) @@ -146,23 +150,26 @@ module History : sig : t -> history_prop Js.t -> State.plugin Js.t val undo - : t -> State.editor_state Js.t -> (State.transaction -> unit) -> bool + : t -> State.command val redo - : t -> State.editor_state Js.t -> (State.transaction -> unit) -> bool + : t -> State.command end module Keymap : sig val keymap - : t -> (string * (State.editor_state Js.t -> (State.transaction Js.t -> unit) -> bool)) array -> State.plugin Js.t + : t -> (string * State.command) array -> State.plugin Js.t end module Commands : sig val baseKeymap - : t -> (string * (State.editor_state Js.t -> (State.transaction -> unit) -> bool)) array + : t -> (string * State.command) array + + val set_block_type + : t -> Model.node_type Js.t -> < .. > Js.t -> State.command end |