Back to API Reference
Derived Types(21)
Types that inherit from InputBehavior.
CCCCCCCCCCCCCCCCCCCCC
AutoValidateBehavior
Re-runs the editor's [[InputValidatorBase]]s on a schedule and writes the result to [[Validation]] for decorators to show. Without it, validation runs only when app code calls [[SetValidation]].
CaretContextBehavior
Hosts [[CaretContextHandler]]s — composable consumers of [[CaretContextChanged]], each carrying its own serialized settings ([[StyleStateHandler]] for toolbar button state; subclass the handler for floating bubbles or custom context UI). Code-first consumers subscribe [[ContextChanged]] directly.
CaseTransformBehavior
Forces typed and pasted text to a fixed letter case as it is entered — uppercase for codes and serials, lowercase for emails / usernames / tags, title case for names. Changes the stored value, not just the rendering.
DefocusOnCancelBehavior
Releases input focus when editing is cancelled by Escape, system back, or EventSystem cancel.
FieldDecorator
Base class for state-driven field visuals: placeholder, floating label, supporting text, character counter, or validation feedback. It participates in the ordinary [[InputBehavior]] lifecycle and appears in the editor's behavior type picker.
InputFilterBase
Base for input filters — they reject characters as they are typed (digits-only, email chars, …) by subscribing to [[InputFilter]]. A separate concern from validation ([[InputValidatorBase]]), which lets input through and judges the whole value for a visible status.
InputMaskBehavior
Formats input live against a pattern — phone (###) ###-####, card #### #### #### ####, date ##/##/####. Slot characters accept input — # a digit, A a letter, * a letter or digit — and every other character is a literal placed automatically. The whole field is re-formatted on every edit — typing, mid-field edits, paste, and deletion all stay aligned; a caret deletion landing on a literal removes the nearest entered character instead, and deleting the last entered character leaves the field empty (no stranded leading literals). The stored text is the formatted value; [[RawText]] returns the entered characters with literals stripped. Slots match single UTF-16 units (BMP): a supplementary-plane character never fills a slot — mask domains (phone, card, date) are BMP by nature, and the one-char-per-slot invariant is what keeps the caret math exact.
InputValidatorBase
Base for value validators — judge the whole current value and return a [[ValidationState]] (open status + message) that an [[AutoValidateBehavior]] publishes to [[Validation]] for decorators to show. A separate concern from input filtering ([[InputFilterBase]]), which rejects characters as they are typed.
KeyboardBehavior
Base for input behaviors that react to the software keyboard's lifecycle — appearing, hiding, animating, or changing frame — while the field is focused. Subclass to build a reaction: keep the field above the keyboard ([[KeyboardAvoidanceBehavior]]), dock a toolbar to the keyboard top, resize a scroll container, dim a backdrop, and so on. Desktop emits no keyboard events, so every subclass is inert there.
LengthLimitBehavior
Caps the field length and publishes the cap for a counter to show. Excess input is truncated on a boundary (never splitting a surrogate pair, multi-byte codepoint, or grapheme cluster); input with no room left is rejected; deletions always pass. [[Unit]] chooses what a unit of length means — by default [[Graphemes]], so a family emoji counts as one.
LinkOnPasteBehavior
Pasting a bare URL over a non-collapsed selection turns the selection into a link instead of replacing it with the URL text — the ProseMirror / WordPress paste-link convention. Uses the field's own link style (the style whose modifier speaks Markdown link syntax, composites included); with no link style in the component's Styles the URL pastes as plain text. A collapsed caret pastes normally, and non-URL payloads pass through.
MediaInputBehavior
Base for handling received media — a clipboard paste, a drag-and-drop, or a picker selection. All three arrive the same way (check [[Source]] when it matters). The hook is subscribed here — subclass and override [[OnImage]] / [[OnFiles]] (or [[OnMedia]] for full control over every format) to do whatever the app needs: upload, insert an inline object, write to disk. Return from an override to consume; otherwise it falls through to the text channels.
NativeFieldOverlayBehavior
Displays a platform-native replica of the editor while preserving [[UniTextEditable]] as the authoritative document and input pipeline on Android, iOS, and WebGL. Other platforms and editors without this behavior use a transparent native input surface; [[NativeKeyboardBehavior]] configures keyboard traits independently.
NativeKeyboardBehavior
Configures the native soft keyboard for the field: layout, return key, capitalization, autofill, and smart features. The single composable home for keyboard traits — the editor reads it when it shows the keyboard. The traits apply both in the default transparent-keyboard mode and when a [[NativeFieldOverlayBehavior]] renders the OS's own field. Password masking is a separate concern ([[PasswordBehavior]]). Desktop has no soft keyboard — the behavior is inert there.
RestoreOnCancelBehavior
Restores the focused-session text and releases input focus when editing is cancelled.
SelectAllOnFocusBehavior
Selects all text when the editor gains focus and preserves it through the focusing pointer gesture.
SingleLineBehavior
Single-line form-field semantics, matching the web <input> contract: every Enter press submits, newlines are stripped from all inserted text (typing, paste, IME commit — multi-line pastes are joined), and submit releases focus unless [[KeepFocusOnSubmit]]. Without it the editor is a document — Enter inserts a newline. Pair with the UniText's Word Wrap turned off for the classic horizontally-scrolling field.
StripFormatOnPasteBehavior
Drops one formatting modifier from pasted content even though the field renders it — paste a styled passage and this format alone arrives as plain text. Use when a field offers a format in its own UI but should not inherit it from the clipboard (e.g. keep authored colors, reject pasted ones). Formats the field has no style for are dropped already; this opts out one it does have.
SubmitKeyBehavior
Binds the Enter key to submit instead of inserting a newline: [[Enter]] submits on Enter (Shift+Enter makes a newline), [[ModifierEnter]] submits on Ctrl/Cmd+Enter (Enter makes a newline). Fits chat composers, comment boxes, prompt and search fields alike. Focus survives submit by default; turn [[KeepFocusOnSubmit]] off for submit-and-close surfaces (comment forms, modal editors). For a field that accepts no newlines at all, use [[SingleLineBehavior]] instead.
TabKeyBehavior
Makes plain Tab insert a tab character instead of moving focus to the next control. Modified combinations (Shift+Tab, Ctrl+Tab) pass through for navigation. Add this for code editors and multi-line composers.
TextFormattingBehavior
User-driven formatting commands, each binding a style source ([[IFormatStyleSource]]) to an optional primary-modifier shortcut (Ctrl on Windows/Linux, Cmd on macOS). A command toggles its style on the selection, or as a typing style at a collapsed caret ([[ToggleStyle{T}]] semantics), in the syntax the resolved style's rule speaks. Toolbar buttons and context menus call [[Toggle]] / [[Toggle]]; button state comes from [[IsStyleActive{T}]] via [[CaretContextBehavior]]. Default commands: bold (B), italic (I), underline (U), clear formatting (\).
protected UniTextEditable editableThe owning editor, assigned before OnEnable and retained through OnDisable.
