API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

I

interfacePlatformTextInput

@codexo/exojs / core / stable

The transport between a text-editing widget and whatever the host uses to receive real keyboard and IME input. The contract knows no text model: it mirrors state in (`setValue`), mirrors geometry in (`setBounds`, `setCaretRect`), states hints (`setHints`), and reports edits and composition progress out through its signals. `createTextInput` may return `null` - a host with no way to receive text input is a supported outcome, not an error. The widget renders and takes focus, but rejects edits.

0
props
7
methods
2
events
Import
import { PlatformTextInput } from '@codexo/exojs'

The transport between a text-editing widget and whatever the host uses to receive real keyboard and IME input. The contract knows no text model: it mirrors state in (`setValue`), mirrors geometry in (`setBounds`, `setCaretRect`), states hints (`setHints`), and reports edits and composition progress out through its signals.

`createTextInput` may return `null` - a host with no way to receive text input is a supported outcome, not an error. The widget renders and takes focus, but rejects edits.

Methods7
blur(): void
Release host focus.
destroy(): void
Tear the transport down: detach element and listeners.
focus(): void
Give the transport host focus, so keyboards and IMEs attach.
Where the field is, in CSS pixels relative to the drawing surface's top-left. Hosts that anchor an input method to a real element position the element there; the caller converts from its own layout space, which is where a UI scale or a canvas display size is applied.
Where the caret is, in the same space as PlatformTextInput.setBounds - the anchor point for an IME candidate window.
setValue(text: string, selectionStart: number, selectionEnd: number): void
Mirror the model's value and selection into the transport, so host-side features that read the element (clipboard, word deletion, undo) operate on the same text the model holds. Ignored while a composition is in flight; the mirror resumes when it ends.
Events2
Source