mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
Remove Emoji support, so MAC addresses etc show correctly.
Thanks to xet7 ! Closes #1248, closes #323
This commit is contained in:
parent
69e4ad48bf
commit
056843d66c
7 changed files with 3 additions and 185 deletions
|
|
@ -4,25 +4,6 @@ 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.]*)$/,
|
||||
|
|
@ -47,7 +28,7 @@ Template.editor.onRendered(() => {
|
|||
import sanitizeXss from 'xss';
|
||||
|
||||
// XXX I believe we should compute a HTML rendered field on the server that
|
||||
// would handle markdown, emoji and user mentions. We can simply have two
|
||||
// would handle markdown and user mentions. We can simply have two
|
||||
// fields, one source, and one compiled version (in HTML) and send only the
|
||||
// compiled version to most users -- who don't need to edit.
|
||||
// In the meantime, all the transformation are done on the client using the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue