Module Ui.Jstr_editor
String editors.
String editors are for editing short strings. See the styling information.
String editors
val v : ?class':Jstr.t -> ?enabled:bool Note.signal -> ?on:'a Note.event -> ?length:int Note.signal -> Jstr.t Note.signal -> t
v ~class' ~enabled ~on ~size s
is an editor for a string:s
is the string value to edit.length
is the length of the editor in number of characters (defaults toS.const 20
).on
can be used to put the string editor on focus and in editing mode.enabled
indicates if the editor can be interacted with defaults toS
.Bool.true'.class'
is added to the underlying element's classes.
val enabled : t -> bool Note.signal
enabled e
istrue
iff the editor is enabled.
val editing : t -> bool Note.signal
editing e
istrue
whenever the string is being edited.
Styling
The element returned by el
makes use of the following CSS classes: