Skip to content

Unable to get emojis to show up #698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ericpoulinnz opened this issue Jun 8, 2025 · 7 comments
Open

Unable to get emojis to show up #698

ericpoulinnz opened this issue Jun 8, 2025 · 7 comments

Comments

@ericpoulinnz
Copy link

ericpoulinnz commented Jun 8, 2025

Typing an emoji string (e.g. :heart:) does not convert to an emoji.

Is there any additional setup to get this working? All other markdown tags seem to work fine. I'm on version 0.1.287

@tomekzaw
Copy link
Collaborator

tomekzaw commented Jun 8, 2025

Hi @ericpoulinnz, thanks for opening this issue.

The feature you have described is not within the scope of this library. In order to achieve this effect, you need to manually find the emojis and update value prop accordingly.

@ericpoulinnz
Copy link
Author

Thanks for the quick response @tomekzaw. Though a bit confusing giving the gif used as the main image shows an emoji being entered / rendered, and then 'emoji' is listed as a supported type lower down.

Is there a better place I should be looking at than the main README for the scope of this library?

@tomekzaw
Copy link
Collaborator

tomekzaw commented Jun 9, 2025

@ericpoulinnz Yeah I understand this can be a bit confusing. Emoji is listed there because you can customize emoji.fontSize. I'm afraid there's no better place than README but I can assist you if you have some questions regarding the library.

@ericpoulinnz
Copy link
Author

Thank you @tomekzaw, that's really helpful!

Is there a good example of overriding the parser logic? Ideally I want to maintain the majority of parseExpensiMark but I would like to change the bolding/italics to align with more standard markdown and to change how mentioning users is handled (I will be wanting to do @username which is not an email or number).

@tomekzaw
Copy link
Collaborator

@ericpoulinnz The best example of customizing the parser logic is in the README here. Basically, you need to pass a worklet that returns an array of MarkdownRange objects. The built-in parseExpensiMark parser uses ExpensiMark from expensify-common under the hood so you might want to try to tweak some parts of it.

@ericpoulinnz
Copy link
Author

ericpoulinnz commented Jun 11, 2025

@tomekzaw maybe I'm just being thick, but I saw that example and was unsure how I would splice that with parseExpensiMark. I like 90% of the existing parsing logic and would like to keep that. Rather than write my own parser, I just wanted to extend the parser to override certain types. I actually think this will be the most common use-case for providing custom parser logic? Are there many people replacing it completely?

Also is there a way to turn off specific types? e.g. I do not want mention-here. Is this also overriding the parser logic?

@tomekzaw
Copy link
Collaborator

@ericpoulinnz To be honest, customizing parsing logic is a bit out of the scope for this library. You can just filter out some MarkdownRange objects returned from parseExpensiMark though, like mention-here for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants