All Projects → netgusto → Upndown

netgusto / Upndown

Licence: mit
HTML to Markdown javascript converter

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Upndown

Mdtool
A tool which can process markdown to HTML
Stars: ✭ 136 (-51.08%)
Mutual labels:  markdown-converter
swift-markdownkit
A framework for parsing and transforming text in Markdown format written in Swift 5 for macOS, iOS, and Linux. The supported syntax is based on the CommonMark specification. The framework defines an abstract syntax for Markdown, provides a parser for parsing strings into abstract syntax trees, and comes with generators for creating HTML and attr…
Stars: ✭ 64 (-76.98%)
Mutual labels:  markdown-converter
keep-it-markdown
Convert Google Keep notes dynamically to markdown for Obsidian and Notion using the unofficial Keep API
Stars: ✭ 125 (-55.04%)
Mutual labels:  markdown-converter
Markdown
📖Clean & Modern MarkDown Generator, 🔌Offline Support and Easy Generation of Markdown ⚡️⚛️ https://github.com/JP1016/Markdown-Electron/releases
Stars: ✭ 170 (-38.85%)
Mutual labels:  markdown-converter
dita-ot-markdown
Markdown parser and output for DITA-OT
Stars: ✭ 39 (-85.97%)
Mutual labels:  markdown-converter
pulldown-cmark-to-cmark
Convert pulldown-cmark Events back to the string they were parsed from
Stars: ✭ 29 (-89.57%)
Mutual labels:  markdown-converter
Swiftymarkdown
Converts Markdown files and strings into NSAttributedStrings with lots of customisation options.
Stars: ✭ 1,274 (+358.27%)
Mutual labels:  markdown-converter
literator
📝 Generate literate-style markdown docs from your sources
Stars: ✭ 55 (-80.22%)
Mutual labels:  markdown-converter
enml2md
Evernote to Markdown Converter
Stars: ✭ 36 (-87.05%)
Mutual labels:  markdown-converter
kMD2PDF
Markdown to PDF conversion library written in Kotlin
Stars: ✭ 14 (-94.96%)
Mutual labels:  markdown-converter
Yarle
Yarle - The ultimate converter of Evernote notes to Markdown
Stars: ✭ 170 (-38.85%)
Mutual labels:  markdown-converter
Panwriter
Markdown editor with pandoc integration and paginated preview.
Stars: ✭ 242 (-12.95%)
Mutual labels:  markdown-converter
torsimany
💡✏️️ ⬇️️ JSON to Markdown converter - Generate Markdown from format independent JSON
Stars: ✭ 49 (-82.37%)
Mutual labels:  markdown-converter
Markdownify
The HTML to Markdown converter for PHP
Stars: ✭ 167 (-39.93%)
Mutual labels:  markdown-converter
markdown articles tool
Parse markdown article, download images and replace images URL's with local paths
Stars: ✭ 37 (-86.69%)
Mutual labels:  markdown-converter
Github Wiki Sidebar
Github Wiki sidebar menu builder with multi-level, ordering and exclusion list support
Stars: ✭ 117 (-57.91%)
Mutual labels:  markdown-converter
forumfmt
A personal tool for converting from Markdown to BBCode for SA:MP forum.
Stars: ✭ 12 (-95.68%)
Mutual labels:  markdown-converter
jekyll-commonmark
CommonMark generator for Jekyll
Stars: ✭ 28 (-89.93%)
Mutual labels:  markdown-converter
slackify-markdown
Convert markdown into Slack-specific markdown
Stars: ✭ 80 (-71.22%)
Mutual labels:  markdown-converter
2bbcode
A set of custom Pandoc writers for converting to BBCode.
Stars: ✭ 19 (-93.17%)
Mutual labels:  markdown-converter

upndown

Javascript HTML to Markdown converter, for Node.js and the browser.

Live demo here.

About

upndown converts HTML documents to Markdown documents.

upndown is designed to offer a fast, reliable and whitespace perfect conversion for HTML documents.

Install / Usage

Browser

Standard loading

Download the zip archive on github, unzip, copy in your web folder, and in your HTML:

<script type="text/javascript" src="/assets/upndown/lib/upndown.bundle.min.js"></script>
<script type="text/javascript">

    var und = new upndown();
    und.convert('<h1>Hello, World !</h1>', function(err, markdown) {
        if(err) { console.err(err); }
        else { console.log(markdown); } // Outputs: # Hello, World !
    });

</script>

Using RequireJS

Download the zip archive on github, unzip, copy in your web folder, and in your HTML:

<script type="text/javascript" src="http://requirejs.org/docs/release/2.1.11/minified/require.js"></script>
<script type="text/javascript">

require.config({
    paths: {
        'upndown': '/assets/upndown/lib/upndown.bundle.min'
    }
});

require(['upndown'], function(upndown) {
    var und = new upndown();
    und.convert('<h1>Hello, World !</h1>', function(err, markdown) {
        if(err) { console.err(err);
        else { console.log(markdown); } // Outputs: # Hello, World !
    });
});
</script>

Nodejs

Install

npm install upndown

Use

var upndown = require('upndown');

var und = new upndown();
und.convert('<h1>Hello, World !</h1>', function(err, markdown) {
    if(err) { console.err(err);
    else { console.log(markdown); } // Outputs: # Hello, World !
});

Warning: With Node < 0.12.8, you'll have to require a polyfill for the Promise functionnality (like https://www.npmjs.com/package/bluebird); see #10 on how to do that.

Options

decodeEntities

By default Updown will decode all html entities, so source HTML like this:

<p>I'm an escaped &lt;em&gt;code sample&lt;/em&gt;.</p>

Will become:

I'm an escaped *code sample*.

If your use case does not call for that behavior and you wish HTML entities to stay encoded, you can pass an option to the constructor:

var und = new upndown({decodeEntities: false})

Then just use as normal.

Test

In the browser

Navigate to test/browser/ inside the upndown folder. Browser tests are executed by QUnit.

Nodejs

To run the tests, simply execute:

npm test

Nodejs tests are executed using mocha.

Maintainer

upndown is produced by Net Gusto. Drop us a line at [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].