WLJS LogoWLJS Notebook

InputText

Wolfram Kernel
InputText[initial_String, opts___] _EventObject

represents an input-text field and returns EventObject

For dynamic read-only indication use TextView

Event generation

Every-time user changes the content, an event in a form of string will be generated

"<current string>"

Options

"Label"

adds a label at the left side to the input text field

"Placeholder"

Text placeholder

"Description"

adds description field to a widget

ImageSize

sets the width in pixels

"Class"

A text string of CSS classes applied to the component wrapper

"Style"

An inline CSS style string applied to the component wrapper

"LabelClass"

A text string of CSS classes applied to the label element

"LabelStyle"

An inline CSS style string applied to the label element

"Topic"

Specifies which topic or pattern of an event is used

"Topic" -> name_String

emits name for each time when user types

"Topic" -> {oninput_String, onchange_String}

emits oninput when any changes occur, while onchange is emitted after the users leaves the field

Example

A simple text input

text = InputText["Hi"]
EventHandler[text, Print];

Chaining events

One can reuse another event

InputText[event_EventObject, rest__]

Dev notes

This is a wrapper for TextView view-component

Supported output forms

On this page