element-hq / element-hq/element-web
Add user configurable autocompletes
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
### Your use case
#### What would you like to do?
It'd be great to be able to configure your own replacement rules using the autocompleter--maybe using :emoji_shortcode:, maybe something else. To keep the feature simple it would seem necessary to place restrictions on what text could be used as a shortcode to autocomplete (e.g., must be bracketed with semicolons). Alternatively, this feature could extend the current plaintext emoji replacement functionality.
#### Why would you like to do it?
If you find yourself typing an explanation of something frequently in a support chat, you could store the explanation in a shortcode and autocomplete it. Or (my use case) you could store the text for a specific inline Markdown image (i.e., ``) to emulate custom emoji (at least until substantial progress is made on https://github.com/matrix-org/matrix-doc/pull/1951).
#### How would you like to achieve it?
Configuration would use a table in the settings menu with a shortcode -> text mapping, though to start this feature could of course be confined to the config.json file. Configured mappings could also be stored as user account data and synced between Element sessions.
### Have you considered any alternatives?
I'm currently using a custom JavaScript shim to emulate something like this functionality, but as you can imagine it's both finicky and fragile.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.