Skip to content

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

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

fix: convert HTML to Markdown in CommentInputField using turndown#173
sumitdahal7 wants to merge 2 commits intonaxa-developers:naxa-devfrom
sumitdahal7:fix/html-to-markdown-editor-conversion

Conversation

@sumitdahal7
Copy link
Copy Markdown

@sumitdahal7 sumitdahal7 commented Apr 28, 2026

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.

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.

1 participant