-
Notifications
You must be signed in to change notification settings - Fork 10
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
Extending react-markdown for example to have underline and text-highlighting #144
Comments
Hi, @ortonomy. We currently don't have guide on adding buttons and decorators. You can achieve what you want by diving into slatejs documentation Line 100 in b060286
and react-markdown source code. I'm not sure if this is a very simple task. Also I'm not sure that you need text centering and underline into markdown editor. Of course you can do it by using html tags into markdown. But you must understand that this editor is raw markdown text editor (at the current time). |
@kvolkovich-sc -- thanks for answering so fast. Perhaps I can let you know about our requirements:
I get this, but ... React-markdown seems to format the markdown to show the resulting format e.g., bold, italic, strikethrough e.g.: So basically, we'd like to be able to add decorators, (e.g. $$ 1^2 $$ for mathjax) and add them as a button too, and then see the result of the markdown, either in separate preview, or partially formatted inside the editor. Does that make sense? |
Yes, it make sense. You can add additional buttons which can insert custom text right now. Its not complex. But I'm not sure about visual decorators by adding CSS class or something like that. Sure, it should be possible by making a little code changes for regex mathing. Right now we have no resources ⏳ to support react-markdown out of business cases bounds. If you want, you can dive into codebase and make a Pull Request. |
We'd like to use react-markdown in a project, but we'd like to extend it to support markdown-it plugins and a couple more decorators.
We're targeting supporting centering text, highlighting, and underline.
Do you have a guide on adding buttons and decorators or a couple pointers where to start?
I noticed https://opuscapita.github.io/react-markdown//branches/master/index.html?currentComponentName=MarkdownInput
which allows me to define extensions as buttons, and even a renderer. Is this all I need to do?
The text was updated successfully, but these errors were encountered: