feat(tui): enabled programmatic form submission via editor APIs

- Added a public `submit()` method to the `Editor` class to trigger form submission.
- Updated the `EditorComponent` interface to expose an optional `submit()` method.
This commit is contained in:
can1357
2026-06-30 16:16:39 +02:00
parent 9ccd83a13d
commit 5cc84db4c4
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -29,6 +29,9 @@ export interface EditorComponent extends Component {
/** Called when user submits (e.g., Enter key) */
onSubmit?: (text: string) => void;
/** Programmatically trigger submission (optional, e.g. for voice submit). */
submit?(): void;
/** Called when text changes */
onChange?: (text: string) => void;