Skip to content

fix: convert HTML to Markdown in CommentInputField using turndown - #173

Open
sumitdahal7 wants to merge 14 commits into
naxa-developers:naxa-devfrom
sumitdahal7:fix/html-to-markdown-editor-conversion
Open

sumitdahal7 wants to merge 14 commits into
naxa-developers:naxa-devfrom
sumitdahal7:fix/html-to-markdown-editor-conversion

Conversation

@sumitdahal7

@sumitdahal7 sumitdahal7 commented Apr 28, 2026 •

Copy link
Copy Markdown

What type of PR is this? (check multiple if applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation
  • 🧑‍💻 Refactor
  • ✅ Test
  • 🤖 Build or CI

Describe this PR (brief summary)
This PR implements automatic conversion of HTML content to Markdown within the CommentInputField component using the turndown library.

Key improvements include:

  • Automatic Conversion: Added a useEffect hook in CommentInputField that detects HTML tags in the comment state and converts them to Markdown.
  • New Utility: Introduced markdownFromHtml in src/utils/htmlFromMarkdown.js which leveragesurndownService.
  • Dependency Management: Added turndown (v7.2.4) to the frontend dependencies.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants