mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 16:00:13 +01:00
Add emojis back, because removing them broke local dev Sandstorm.
Thanks to xet7 ! Opens #1248, opens #743, opens #643, opens #323
This commit is contained in:
parent
f0b7f34928
commit
a62c8eb5a0
5 changed files with 32 additions and 2 deletions
|
|
@ -4,6 +4,25 @@ Template.editor.onRendered(() => {
|
|||
autosize($textarea);
|
||||
|
||||
$textarea.escapeableTextComplete([
|
||||
// Emoji
|
||||
{
|
||||
match: /\B:([\-+\w]*)$/,
|
||||
search(term, callback) {
|
||||
callback(Emoji.values.map((emoji) => {
|
||||
return emoji.includes(term) ? emoji : null;
|
||||
}).filter(Boolean));
|
||||
},
|
||||
template(value) {
|
||||
const imgSrc = Emoji.baseImagePath + value;
|
||||
const image = `<img src="${imgSrc}.png" />`;
|
||||
return image + value;
|
||||
},
|
||||
replace(value) {
|
||||
return `:${value}:`;
|
||||
},
|
||||
index: 1,
|
||||
},
|
||||
|
||||
// User mentions
|
||||
{
|
||||
match: /\B@([\w.]*)$/,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue