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
Change editor styling based on Regex #421
Comments
You can rerender the edit area. @amolpatel react-md-editor/core/src/Editor.tsx Lines 88 to 90 in 8acedb0
|
How does that help me use regex to replace a specific line of text? I'm also using Next so I have to use version |
https://codesandbox.io/s/recursing-edison-w1rryo?file=/pages/index.js
|
Ah nice! Thanks for clarifying that. I still am not entirely sure how to accomplish syntax highlighting based on a specific regex pattern by re-rendering the text area. I guess I could do something similar to #195 (comment) but that seems quite hacky. Ideally, I could use Prism to highlight some syntax in the editor |
@jaywcjlove Any chance you can help with the above? |
@amolpatel Sorry I can't help you very well. |
Hey all,
This is a great library, thanks for contributing! I have a quick question hoping someone could help me:
I would like to automatically update the styling for any text that matches a specific regex pattern in the editor. For example, if a user enters in any text in double curly braces, I want to change the color. Eg.
{{text}}
should highlight to green.I know the library supports syntax highlighting but I was wondering if I can build any custom highlighting.
Thanks in advance!
The text was updated successfully, but these errors were encountered: