type TextEditCompletionCallback: (newValue) => boolean | string | Promise<boolean | string>;
A text editing hook provided to Viewport.hookTextEdit
may return a TextEditCompletionCallback to specify what behavior should happen when the user finishes editing text.
If this callback returns false, the edit is reverted.
If this callback returns a string, the typed value is replaced with that string.
Parameters
Parameter | Type |
---|---|
newValue | string |
Returns
boolean
| string
| Promise
<boolean
| string
>