ezjs_ace

Bindings for the Ace editor
Module Ezjs_ace . Ace
val iter_option : ( 'a -> unit ) -> 'b option -> unit

Editor

type 'a editor = {
editor_div : Js_of_ocaml.Dom_html.divElement Js_of_ocaml.Js.t;
editor : ('a editor * 'a option) Ace_types.editor Js_of_ocaml.Js.t;
mutable marks : int list;
mutable keybinding_menu : bool;
}
val create_position : int -> int -> Ace_types.position Js_of_ocaml.Js.t
val greater_position : < column : < get : 'res.. > Js_of_ocaml.Js.gen_prop ; row : < get : 'res0.. > Js_of_ocaml.Js.gen_prop.. > Js_of_ocaml.Js.t -> < column : < get : 'res1.. > Js_of_ocaml.Js.gen_prop ; row : < get : 'res2.. > Js_of_ocaml.Js.gen_prop.. > Js_of_ocaml.Js.t -> bool
val read_position : < column : < get : 'res.. > Js_of_ocaml.Js.gen_prop ; row : < get : 'res0.. > Js_of_ocaml.Js.gen_prop.. > Js_of_ocaml.Js.t -> 'res1 * 'res2
val read_range : < end_ : < get : < column : < get : 'res.. > Js_of_ocaml.Js.gen_prop ; row : < get : 'res0.. > Js_of_ocaml.Js.gen_prop.. > Js_of_ocaml.Js.t.. > Js_of_ocaml.Js.gen_prop ; start : < get : < column : < get : 'res1.. > Js_of_ocaml.Js.gen_prop ; row : < get : 'res2.. > Js_of_ocaml.Js.gen_prop.. > Js_of_ocaml.Js.t.. > Js_of_ocaml.Js.gen_prop.. > Js_of_ocaml.Js.t -> ('res3 * 'res4) * ('res5 * 'res6)
val get_contents : ?range:Ace_types.range Js_of_ocaml.Js.t -> 'a editor -> string
val set_contents : 'a editor -> string -> unit
val get_selection_range : 'a editor -> Ace_types.range Js_of_ocaml.Js.t
val get_selection : 'a editor -> string
val get_line : 'a editor -> int -> string
val get_custom_data : 'a editor -> 'b
val set_custom_data : 'a editor -> 'b -> unit
val set_mode : 'a editor -> string -> unit
val set_theme : 'a editor -> string -> unit
module Mark_type : sig ... end
include module type of struct include Mark_type end
type mark_type = Mark_type.mark_type =
| Error
| Warning
| Message
val string_of_make_type : mark_type -> string
val require : string -> 'res
val range : 'a -> 'b -> 'c -> 'd -> range
type loc = {
loc_start : int * int;
loc_end : int * int;
}
val set_mark : 'a editor -> ?loc:loc -> ?type_:mark_type -> string -> unit
val set_background_color : 'a editor -> string -> unit
val add_class : 'a editor -> string -> unit
val remove_class : 'a editor -> string -> unit
val clear_marks : 'a editor -> unit
val record_event_handler : 'a editor -> string -> ( unit -> unit ) -> unit
val focus : 'a editor -> unit
val resize : 'a editor -> bool -> unit
val get_keybinding_menu : 'a editor -> Ace_types.keybinding_menu Js_of_ocaml.Js.t option
val show_keybindings : 'a editor -> unit
val add_keybinding : 'a editor -> ?ro:bool -> ?scrollIntoView:string -> ?multiSelectAction:string -> string -> string -> ( 'a editor -> unit ) -> unit

Mode

val token : type_:string -> string -> Ace_types.token Js_of_ocaml.Js.t
type 'state helpers = {
initial_state : unit -> 'state;
get_next_line_indent : 'state -> line:string -> tab:string -> string;
get_line_tokens : string -> 'state -> int -> doc -> 'state * token list;
check_outdent : ( 'state -> string -> string -> bool ) option;
auto_outdent : ( 'state -> Ace_types.document Js_of_ocaml.Js.t -> int -> unit ) option;
}
val create_js_line_tokens : ('t122 * Ace_types.token Js_of_ocaml.Js.t list) -> 't1220 Ace_types.line_tokens Js_of_ocaml.Js.t
val define_mode : string -> 'a helpers -> 'b
val set_font_size : 'a editor -> int -> unit
val set_tab_size : 'a editor -> int -> unit
val get_state : 'a editor -> int -> < .. > Js_of_ocaml.Js.t
val replace : < replace : 't152 -> Js_of_ocaml.Js.js_string Js_of_ocaml.Js.t -> 'res Js_of_ocaml.Js.meth.. > Js_of_ocaml.Js.t -> 't1520 -> string -> 'res0
val delete : < replace : 't155 -> Js_of_ocaml.Js.js_string Js_of_ocaml.Js.t -> 'res Js_of_ocaml.Js.meth.. > Js_of_ocaml.Js.t -> 't1550 -> 'res0
val remove : 'a editor -> unit