Ui.Jstr_editor
SourceString editors.
String editors are for editing short strings. See the styling information.
The type for 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 to S.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 to Note.S.Bool.true'
.class'
is added to the underlying element's classes.action e
occurs with a new string when an edition was validated.
enabled e
is true
iff the editor is enabled.
editing e
is true
whenever the string is being edited.
The element returned by el
makes use of the following CSS classes: