Default emoji plugin: how to disable?


(Julien Gourdon) #1

This is also related to localization.
In the post editor, when I finish a sentence with a space, and then a “:”, a little pop-up appears with some proposed smileys.

  • This is annoying because in French, a “:” is always preceded with a space. Same for “;”, “!”, “?” and basically all punctuation marks that have at least two connex strokes. (For example this is not true for “.” and “,”)

  • So when I write in French, I don’t want to see the smiley pop-up when I type space+":"

  • If I type “esc” to remove this pop-up, the post editor disappears…

So, bug or feature?

When inserting colon and pressing enter, a smiley is inserted
(Valts) #2

Ahh, localization! :slight_smile:

As I understand, the emoticon support is a plugin, so I expect that for french-speaking communities a different plugin with different rules would be more appropriate than the default one.

But, all in all - feature, not bug. :smile:

(Nicholas Perry) #3

I am bothered quite a bit on typing : and then hitting [enter]. It is jarring that it auto completes, when I really wanted a new line instead. It is unexpected and feels odd that it takes control of what my keyboard is doing. if I hit enter in a text-area, i expect a new line unless i initiated something else on purpose.

I just want to go about my typing dammit! :smiley:

(Julien Gourdon) #4

Ok but where can I de-activate this plugin? I did not find any way to do it in the admin panel.

(Régis Hanol) #5

Commenting this line out in the Gemfile and then running the bundle install command should do it.

(Camille Roux) #6

What about adding an option in the admin interface to disable it?

(Jeff Atwood) #7

I kind of feel it should be on by default. Standard set of emoji are an emerging standard of online human expression and I want to encourage that, not discourage it.

(Camille Roux) #8

I’m doing a professional use of Discourse, I’d prefer not to see emoji on it and some people gave me the same feedback. Moreover the UX is quite boring when you just want to write a “:”.
I agree to say it should be on by default, but I think it should be easy to disable it. Don’t you think?

(Camille Roux) #9

In fact, I understand better your answer now. The problem come from the French language. In French, you need to have a space between a word and a “:”. So the emoji popup is displayed each time you want to write a “:” :frowning:

(Stéphane Klein) #10

@CamilleRoux same issue here :

Have you found a clean solution to disable emoji plugin ?

(Régis Hanol) #11

Have you tried disabling the “enable emoji” site setting?

(Sam Saffron) #12

@zogstrip in French we really should be holding off emoji completion till first letter is typed

(Dan Dascalescu) #13

The same problem occurs when typing a : after ), which is more common than it seems if you type Markdown URLs. For example:

Here are the problems with [this approach](   <-- here

* the smiley prompt appears after typing the :

(Alan Tan) #14

Emoji autocomplete used to popup only if : was typed after a space. However, we had reports like

and I submitted a PR to basically have the emoji autocomplete pop up whenever : is typed. It seems like we might have relaxed the regexp too much? A setting to blacklist certain characters might be one solution. :cat2:

(Jeff Atwood) #15

Not true, it does not appear when you do this:

So probably just blacklist parens as well.

(Alan Tan) #16

opps yea you’re right. The fix previously was as follow:

(Alan Tan) #17

I’ve included ) and ] into the blacklist for now. If more customization is needed, we could turn the regexp into a site setting.

(Discourse.PRO) #18

The commit FIX: Trigger autocomplete when bounded by non-word characters. · discourse/discourse@f3e3cbe · GitHub is wrong because /\W/.test(prevChar) expression does not regard not-latin letters.



(Mittineague) #19

I’m curious, which Emoji sets use non-latin characters?

(Alan Tan) #21

This should fix it but it requires us to copy the entire Unicode’s “Letter” category since Unicode categories are not supported in JavaScript.