-
Notifications
You must be signed in to change notification settings - Fork 56
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
feat(common-ui): Add Markdown component. #2741
Conversation
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.
Looking pretty good. I think some stuff can be improved:
- We can make our blockquotes look like github's. Example:
Will render:
But with our markdown editor the same input will render:
- We can make our ordered list automatically jump to the next item, like github does:
- Any plans to add keyboard shortcuts? Currently on politeia we can make text bold with Cmd+B and italic with Cmd+I. Would be nice to have key bindings for all the itens in the toolbar.
- You forgot to add the ordered list to the toolbar.
- I think we can add the task list to the toolbar as well. I think it would be pretty useful for proposal updates.
plugins-structure/packages/common-ui/src/components/Markdown/MarkdownEditor/commands.js
Outdated
Show resolved
Hide resolved
plugins-structure/packages/common-ui/src/components/Markdown/MarkdownEditor/commands.js
Outdated
Show resolved
Hide resolved
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.
Left a comment
plugins-structure/packages/common-ui/src/components/Markdown/MarkdownEditor/MarkdownEditor.js
Outdated
Show resolved
Hide resolved
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.
LGTM. Great job!! 👏
This diff adds the scope for Politeiagui's Markdown component.
Go to
localhost:3007
for a better example.Includes:
Pros: