Insert MD links when autocompleting in MD mode
These will appear decorated because they are inserted as entities. It was necessary to modify pills to have an explicit linkText that is derived from the `href` being pillified (and is thus no longer the inserted completion but rather the display name (or user ID) or room alias.
This commit is contained in:
parent
199b771051
commit
84fe51a162
3 changed files with 21 additions and 23 deletions
|
@ -56,13 +56,7 @@ export default class UserProvider extends AutocompleteProvider {
|
|||
return {
|
||||
completion: displayName,
|
||||
suffix: range.start === 0 ? ': ' : ' ',
|
||||
entity: {
|
||||
type: 'LINK',
|
||||
mutability: 'IMMUTABLE',
|
||||
data: {
|
||||
url: 'https://matrix.to/#/' + user.userId,
|
||||
},
|
||||
},
|
||||
href: 'https://matrix.to/#/' + user.userId,
|
||||
component: (
|
||||
<PillCompletion
|
||||
initialComponent={<MemberAvatar member={user} width={24} height={24}/>}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue