-
-
Notifications
You must be signed in to change notification settings - Fork 212
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(#22): Setup markdown editor #40
feat(#22): Setup markdown editor #40
Conversation
…Clone into setup-markdown-editor
@ddsuhaimi I have requested some small changes on the PR, other than that great work. |
@Mayank0255 |
Great job man. I just checked it out and it works fine for the functionalities given but you have forgotten to add code and hyperlink functionality to it. While adding the code one don't forget to look at the ui of original stackoverflow clone. And one doubt I had is that what is |
@ddsuhaimi One last thing that don't forget to remove the monospace feature as it's not required |
@Mayank0255 For the other 2, the converter library still having an open issues for code block (HubSpot/draft-convert#182) (you can uncomment the code block, it works but having conversion issues) and I'll see how to implement the link since it doesn't come by default in draft.js |
Yes, good work 👍🏽
Sure, do that please and work on the code block thing and removing the monospace too while you are at it. |
What's the progress on this? |
Sorry, it is probably gonna take a while. I've been kinda busy lately. I'll develop this in the weekend. |
@ddsuhaimi Sure |
@ddsuhaimi Are you facing any kind of problem somewhere? |
Hi, sorry it took a while. Turns out, the issue is on 'draft-convert' library itself. It just can't convert code block to its corresponding html (and it is actually an open issue in its repo and still hasn't been resolved). So, there is pretty much no use of having code block in the editor when we can't convert it. This is also the case for link. |
Okay, I see Here's an answer for draftjs to html conversion by the author himself - Here In which the author has recommended to use the libraries listed over there as it's officially built by them and for a running example you can see this and the repository to which is listed here In the demo shown code block is specifically implemented also. The link to the package repo is here I hope this solves the issue and if not then let me know. I know this can be tiring to find out the solution but till know you have done a marvelous job so it won't hurt to finish it off perfectly too. It might seem a big task of replacing the draft-convert with this but it would take hardly and hour after figuring out the approach and for which I am here. P.S. - I am thinking of integrating docusaurus to the backend in which along with the API, a blog page would also be there in which news would come out referring the contributors and congratulating them and explaining about the contribution to the project. This is just to tell you that the contribution won't be in vain. |
so is it okay if instead of using pure draft-js with draft-convert, we use react-rte? which i think, under the hood, is draft-js? |
@ddsuhaimi Sure, go ahead As long as it satisfies our needs, its fine |
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 code looks pretty much fine, so for better review and my convenience could you add two screenshots?
- of the editor with information written in it while applying most of the essential features, like bold, italics, underline, code block, lists, hyperlinks, etc.
- of the rendered output of the same in the Post page of the particular post you added
Would that be fine with you to attach?
@Mayank0255 |
@ddsuhaimi Good job man!! Thank you for working patiently with me 😄 Looking forward to more of the contributions from your side |
No description provided.