From 056843d66c361594d5d4478cfe86e2e405333b91 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Mon, 12 Feb 2018 23:52:22 +0200 Subject: Remove Emoji support, so MAC addresses etc show correctly. Thanks to xet7 ! Closes #1248, closes #323 --- client/components/main/editor.jade | 5 ++--- client/components/main/editor.js | 21 +-------------------- client/components/main/layouts.styl | 5 ----- 3 files changed, 3 insertions(+), 28 deletions(-) (limited to 'client/components/main') diff --git a/client/components/main/editor.jade b/client/components/main/editor.jade index f10d64a1..31f533e6 100644 --- a/client/components/main/editor.jade +++ b/client/components/main/editor.jade @@ -9,6 +9,5 @@ template(name="editor") template(name="viewer") .viewer +mentions - +emoji - +markdown - {{> UI.contentBlock }} + +markdown + {{> UI.contentBlock }} diff --git a/client/components/main/editor.js b/client/components/main/editor.js index 5f384ece..888fbe00 100755 --- a/client/components/main/editor.js +++ b/client/components/main/editor.js @@ -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 = ``; - 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 diff --git a/client/components/main/layouts.styl b/client/components/main/layouts.styl index 734a5e83..a79ff337 100644 --- a/client/components/main/layouts.styl +++ b/client/components/main/layouts.styl @@ -270,11 +270,6 @@ kbd .grabbing cursor: grabbing -.emoji - height: 18px - width: 18px - vertical-align: text-bottom - // Implement a thiner close icon as suggested in // https://github.com/FortAwesome/Font-Awesome/issues/1540#issuecomment-68689950 .fa.fa-times-thin:before -- cgit v1.2.3-1-g7c22