-
Notifications
You must be signed in to change notification settings - Fork 840
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
WIP: Add markdown_editor component #2597
Conversation
Thanks @i-a-n, no worries about your todo list. We'll jump in and evaluate / clean up. Might not happen till after the holidays depending upon the schedule, but it's a great place to start from a feature perspective. Thanks for the start! |
Thanks @i-a-n !! As markdown processors/renderers are pretty stable around their interface (give text input in, get rendered content out) I think it would make sense to have this component be markdown processor agnostic and allow it to be configured in some fashion. That would naturally extend this component beyond markdown, and allow other processors/renderers to be used. That continues down the path that maybe the editor bar should be configurable, but I think that we can avoid implementing that as long as we don't do something which would block building it in the future. |
As a heads up, @miukimiu will take a run through this from the design side. |
@@ -61,6 +61,8 @@ | |||
"react-is": "~16.3.0", | |||
"react-virtualized": "^9.21.2", | |||
"resize-observer-polyfill": "^1.5.0", | |||
"showdown": "^1.9.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll want to be careful when using a new markdown library: https://github.com/showdownjs/showdown/wiki/Markdown's-XSS-Vulnerability-(and-how-to-mitigate-it) and https://github.com/phw/showdown-htmlescape#notes-on-security
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal will be to not prescribe what library is used and instead only focus on the editor. The rendering library will be configurable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for the clarification @chandlerprall!
Summary
Hi folks, long time user, first time contributor here. As mentioned in issue #1491 , I've been advised to start a PR with the work I've done thus far on a markdown editor for EUI.
This is the result of work I've done for the Dream Machine project recently.
Now there's a lot left to do here, which I don't really have the immediate experience or time to accomplish efficiently, but I hope this will at least be a good starting point for the EUI team to run with. Here are some things even I know need some work, as I open this PR:
prettier
task complains about a line that, if I "fix" it, makes TypeScript complain. Not sure how to resolve at present.any
&@ts-ignore
s present.showdown
)But, in any case, I hope this is a helpful start. Please feel free to grab me on Slack (@ ian.moersen) if you want to talk in real-time!
/cc @ajangus @CBlaisure
Checklist