Remove withespaces from mentions

Signed-off-by: Louis Chemineau <louis@chmn.me>
pull/1726/head
Louis Chemineau 2023-04-11 12:20:04 +02:00
rodzic 8890d7d68e
commit 9d01a2da2d
1 zmienionych plików z 13 dodań i 14 usunięć

Wyświetl plik

@ -197,13 +197,12 @@ export default {
+ '</div>'
},
selectTemplate(item) {
return `
<span class="mention" contenteditable="false">
<a href="${item.original.url}" target="_blank">
<img src="${item.original.avatar}"/>
@${item.original.value}
</a>
</span>`
return '<span class="mention" contenteditable="false">'
+ `<a href="${item.original.url}" target="_blank">`
+ `<img src="${item.original.avatar}"/>`
+ `@${item.original.value}`
+ '</a>'
+ '</span>&nbsp;'
},
values: debounce(async (text, populate) => {
if (text.length < 1) {
@ -311,13 +310,13 @@ export default {
handle += `@${this.hostname}`
}
this.$refs.composerInput.innerHTML = `
<span class="mention" contenteditable="false">
<a href="${account.url}" target="_blank">
<img src="${account.avatar}"/>
@${handle}
</a>
</span>&nbsp;`
this.$refs.composerInput.innerHTML
= '<span class="mention" contenteditable="false">'
+ `<a href="${account.url}" target="_blank">`
+ `<img src="${account.avatar}"/>`
+ `@${handle}`
+ '</a>'
+ '</span>&nbsp;'
this.updateStatusContent()
},
updateStatusContent() {