any way to turn off `:s` style emojis?
See original GitHub issueimport { toArray } from 'react-emoji-render';
// "Names must be lowercase, and can't contain spaces, periods, or most punctuation."
// -super helpful slack emoji name validation message
const SLACK_EMOJI_PATTERN = /:([\w+_-]+):\s?/gi;
export const renderEmojis = (value: string) => {
const emojisArray = toArray(value)
console.log(emojisArray);
// toArray outputs React elements for emojis and strings for other
const newValue = emojisArray.reduce<string>(
(previous: string, current: string | React.ReactElement) => {
if (typeof current === 'string') {
// omit un-rendered emojis
return previous + current.replace(SLACK_EMOJI_PATTERN, '');
}
return previous + (current.props.children as string);
},
''
);
return newValue;
};
console.log(renderEmojis(
":stacked=\"isStackedGraph\"\r\n"
))
===>
😒tacked="isStackedGraph"
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Tip: Ban Emojis From Android and iOS - Thurrott.com
Apple simply lets you remove the emoji key, which is the approach I like the best: Navigate to Settings > General > Keyboard...
Read more >Suggest Emoji Setting on Samsung Galaxy S21 - YouTube
Check out more: https://www.hardreset.info/devices/samsung/samsung-galaxy-s21/Samsung Galaxy S21 has Emoji Suggest setting turned on ...
Read more >How to Turn Off Auto Emojis on Discord Mobile - iOS & Android
How to turn off auto emojis in Discord mobile? In this tutorial, I show you how to disable Discord auto emojis. Turning off...
Read more >How to Enable/Disable Keyboard Suggest Emojis - YouTube
Learn how you can enable or disable keyboard suggest emojis on the Samsung Galaxy S22 / S22+ / S22 Ultra. Gears I use:Velbon...
Read more >How to Change Android Emojis - YouTube
Want IOS Emojis on your Android device? Here's how you can change them. Emoji Search: https://goo.gl/AKJoJVEmoji Switch...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

split(/(?<= )😒(?= )/) will only exclude 😒 if it is standing alone…
Hi @andycmaj ! Sorry for the late answer, did you find any solution to your issue ?
We do not support disabling these emojis, but maybe you could exclude the part of the string that you don’t want to be included in the matching based on your use case ?
Like
or whatever your need is (I don’t see any other emojis on the string you provided).