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

Define mentions #167

Closed
nandorojo opened this issue Feb 8, 2024 · 6 comments
Closed

Define mentions #167

nandorojo opened this issue Feb 8, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@nandorojo
Copy link
Contributor

Is there a way to define the possible names which can get mentioned? Something like:

<MarkdownTextInput 
  mentionable={['Fernando ]}
/>
@tomekzaw
Copy link
Collaborator

tomekzaw commented Feb 8, 2024

Currently, the Markdown parser is hard-coded in the library, but long-term we plan to add possibility to use custom parsers implemented in JavaScript as worklets. This will allow for handling cases just like this one and many more.

@tomekzaw tomekzaw added the enhancement New feature or request label Feb 23, 2024
@pleerock
Copy link

pleerock commented Aug 8, 2024

Right now it seems like only @here is highlighted, which is... weird. Would be great to have a control over that.

@tomekzaw
Copy link
Collaborator

tomekzaw commented Aug 8, 2024

Yes, we're working on it in #439

@tomekzaw
Copy link
Collaborator

tomekzaw commented Dec 5, 2024

@nandorojo @pleerock Now that #439 is merged you should be able to implement your own custom logic.

@tomekzaw tomekzaw closed this as completed Dec 5, 2024
@nandorojo
Copy link
Contributor Author

hey @tomekzaw thanks for the update. Are there docs somewhere on how this kind of logic could allow us to tag users, hashtags, etc? Or maybe an example?

@tomekzaw
Copy link
Collaborator

tomekzaw commented Dec 11, 2024

@nandorojo There's an example in the README: https://github.com/Expensify/react-native-live-markdown?tab=readme-ov-file#parsing-logic You just need to replace the logic with your code to detect mentions/hashtags. Let me know if you need more details.

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

No branches or pull requests

3 participants