Skip to content
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

Any way to disable emojis? #44

Closed
riverole opened this issue Jul 23, 2019 · 2 comments
Closed

Any way to disable emojis? #44

riverole opened this issue Jul 23, 2019 · 2 comments

Comments

@riverole
Copy link

Hi,

First of all, thanks a lot for this library, it is pretty awesome. The only thing that I would like to tweak is to disable emojis on the comments. I have been checking around and I can hide the emojis that are being printed, but I cannot hide the input type emojis when adding the comment (there isn't any class or CSS selector that I can use as far as I know). Any way that we could disable them through a parameter in Tip or so? Thanks!

@agentcooper
Copy link
Owner

I don't think there is a way to disable those at the moment. My initial idea was that people will provide their custom <Tip /> component if they want any customizations.

Feel free to send a PR with the added className.

@YuYanzy
Copy link

YuYanzy commented Mar 20, 2021

Hi! I've just solved this problem. Although a long time has passed since this issue was raised, I'll share my solution to help those who come after.
I have to say, the code design of this repo is very good.

To disable emojis, you just need to customize the <Tip /> component. The simplest way is to copy the original code of <Tip / > component, command out the emoji part, and then import your customized <Tip / > component in your code.

Here is the original <Tip /> component code: https://github1s.com/agentcooper/react-pdf-highlighter/blob/master/packages/react-pdf-highlighter/src/components/Tip.js

At last, thanks for such a helpful project again! 👍 👍 👍

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

3 participants