JSPM

react-native-html-to-markdown

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 190
  • Score
    100M100P100Q81955F
  • License MIT

html to markdown converter compatible with react-native

Package Exports

  • react-native-html-to-markdown

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-html-to-markdown) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

React-Native Html to markdown converter

A simple html to markdown converter that converts html to markdown, using no dependencies. Perfect for react-native.

My own use case for this is quite simple. If it doesn't quite fit yours, PRs are welcome!

Tags Supported

  1. h1,h2,h3,h4,h5,h6
  2. p
  3. ul,ol
  4. blockquote,
  5. pre
  6. bold,strong
  7. italic,em
  8. a
  9. br

Converting Html Documents

var converter = require('html-to-markdown');
var markdown = converter.convert('<h2> Happy Journey </h2>');

Extending to add your own formatters.

var converter = require('html-to-markdown');
converter.use(function (html) {
  // making required changes
  // and return new html
})

credits

This was forked from https://github.com/thetutlage/html-to-markdown, which was a good start but is no longer maintained.