Logo

Search

projects ● 156 words ● 1 minute read

paste2markdown - App to Convert

Paste2Markdown is a simple app to use online or locally to convert HTML/text files to markdown format. Use of the app is easy; you can download the repository or clone it to your local and run index.html by your favorite browser.

Just copy the text or HTML you want to convert and paste it in the Paste2Markdown window. To copy the converted Markdown to the clipboard, press Ctrl+A followed by Ctrl+C (or ⌘+A and ⌘+C on Mac).

The HTML is made with bootstrap and the program is built on html2markdown by Kates Gasis.


html2markdown

Installation

npm install html2markdown

Usage in Node.js

var html2markdown = require('html2markdown');

console.log(html2markdown('<h1>Hello markdown!</h1>'));

Usage in Browser

<script type="text/javascript" src="markdown_dom_parser.js"></script>
<script type="text/javascript" src="html2markdown.js"></script>

console.log(html2markdown("<h1>Hello markdown!</h1>"))

This call will return convert the HTML and return the markdown string like “”# H1\n\n”