In-Browser markdown editor

Solution retrospective
Parse plain text to HTML tag - This is the most difficult part of this project. Paring ordered, unordered list and code block are the most difficult part, so I use the powerful reduce array function to achieve it. I did't use reduce much in other projects, but this time I am much familiar with it, really happy to make parsing HTML flow smooth!
Regex - Honestly I used to be a little bit afraid of using Regex, After this project I become more confident with it. For parsing plain text to HTML tag, I create a Regex.tsx file to handle all the expression.
Dark mode - This time I implement this by using modern css selector :has().
Custom Hook
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Danny Wen’s solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord