Conversation
| export class ComposerApi implements ModuleComposerApi { | ||
| public constructor(private readonly dispatcher: MatrixDispatcher) {} | ||
|
|
||
| public insertTextIntoComposer(text: string): void { |
There was a problem hiding this comment.
How useful is this Module API really if you don't know what mode your user's composer is in?
one of 4:
- CIDER with markdown enabled (default)
- CIDER with markdown disabled (settings)
- RTE with rich text enabled (labs)
- RTE with rich text disabled (labs)
Depending on which option the user has this Module API will yield very different results, no?
There was a problem hiding this comment.
Let's just make this a plaintext function that's common between all 4 of those kinds. If future module makers want to markdown and go nuts, they can add that functionality. Hopefully in a world where we have fewer composers.
| * @returns Returns immediately, does not await action. | ||
| * @alpha Likely to change | ||
| */ | ||
| insertTextIntoComposer(text: string): void; |
There was a problem hiding this comment.
The description for the ComposerAPI is to alter the message composer, this method doesn't alter it?
There was a problem hiding this comment.
I had other plans for the composer API, so it will be doing some altering, but maybe I can find a more general phrase.
Split out from #33166
Part of a series of PRs to extend the Module API for the integrations team.
This one is the smallest change to add the ability to insert text into the composer.
Checklist
public/exportedsymbols have accurate TSDoc documentation.