package ezjs_ace

  1. Overview
  2. Docs
val iter_option : ('a -> unit) -> 'a option -> unit

Editor

type 'a editor = {
  1. editor_div : Js_of_ocaml.Dom_html.divElement Js_of_ocaml.Js.t;
  2. editor : ('a editor * 'a option) Ace_types.editor Js_of_ocaml.Js.t;
  3. mutable marks : int list;
  4. 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 : 'res.. > Js_of_ocaml.Js.gen_prop ; row : < get : 'res0.. > 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 -> 'res0 * 'res
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 -> ('res2 * 'res1) * ('res0 * 'res)
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 -> 'a
val set_custom_data : 'a editor -> 'a -> 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 =
  1. | Error
  2. | Warning
  3. | Message
val string_of_make_type : mark_type -> string
val require : string -> 'res
val range : 'a -> 'b -> 'c -> 'd -> range
type loc = {
  1. loc_start : int * int;
  2. 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 = {
  1. initial_state : unit -> 'state;
  2. get_next_line_indent : 'state -> line:string -> tab:string -> string;
  3. get_line_tokens : string -> 'state -> int -> doc -> 'state * token list;
  4. check_outdent : ('state -> string -> string -> bool) option;
  5. 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) -> 't122 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 -> 't152 -> string -> 'res
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 -> 't155 -> 'res
val remove : 'a editor -> unit
OCaml

Innovation. Community. Security.