File tree Expand file tree Collapse file tree
packages/module-api/src/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /**
2+ * API to alter the message composer.
3+ * @alpha Likely to change
4+ */
5+ export interface ComposerApi {
6+ /**
7+ * Insert plaintext into the current composer.
8+ * @param text - The plain text to insert
9+ * @returns Returns immediately, does not await action.
10+ * @alpha Likely to change
11+ */
12+ insertTextIntoComposer ( text : string ) : void ;
13+ }
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import { type ClientApi } from "./client.ts";
2323import { type WidgetLifecycleApi } from "./widget-lifecycle.ts" ;
2424import { type WidgetApi } from "./widget.ts" ;
2525import { type CustomisationsApi } from "./customisations.ts" ;
26+ import { type ComposerApi } from "./composer.ts" ;
2627
2728/**
2829 * Module interface for modules to implement.
@@ -159,6 +160,12 @@ export interface Api
159160 */
160161 readonly customisations : CustomisationsApi ;
161162
163+ /**
164+ * Allows modules to customise the message composer.
165+ * @alpha Subject to change.
166+ */
167+ readonly composer : ComposerApi ;
168+
162169 /**
163170 * Create a ReactDOM root for rendering React components.
164171 * Exposed to allow modules to avoid needing to bundle their own ReactDOM.
You can’t perform that action at this time.
0 commit comments