element-hq / element-hq/element-web

Add user configurable autocompletes

Open
#19,747 5 comments 3 reactions 0 assignees View on GitHub
A-Autocomplete A-Composer O-Uncommon T-Enhancement X-Needs-Design Z-Power-Users
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., `![](mxc://homeserver.org/media_id)`) 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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.