Git Product home page Git Product logo

htmeld.js's Introduction

htmeld.js

Here's a JavaScript that allows you to meld Markdown and HTML in a single HTML file. My rationale for creating this script is that I want to be able to write and edit articles in static web pages without having to manually convert back and forth between Markdown. Using this script, you can write Markdown directly into your HTML and have your browser render it as HTML. In your editor, it will still be clean, readable Markdown.

Usage

It's very simple to use. Just include the htmeld.js script in your HTML file:

<script type="text/javascript" src="/path/to/htmeld.js"></script>

You should add that script at the end of your HTML so it doesn't run until all the elements are loaded. Then, any HTML element with a Markdown class will have its contents converted into HTML in the browser.

<div class="markdown">

# Article Title

Lorem ipsum dolor...

</div>

becomes

<div class="markdown">

<h1>Article Title</h1>

<p>Lorem ipsum dolor...</p>

</div>

Installation

Also pretty simple.

$ curl -S https://raw.github.com/aaronjgreenberg/htmeld.js/master/htmeld.min.js > htmeld.js

License

Licensed under the MIT license.

Also important: this software is pretty much just a slim wrapper around John Fraser's Showdown, which is a JavaScript port of John Gruber's Markdown. Fraser holds the copyright on Showdown; Gruber hold's the copyright on Markdown.

Thanks

To John Fraser, John Gruber, and Corey Innis, for hosting a Showdown repository on GitHub.

๐Ÿค˜

htmeld.js's People

Contributors

aaronjgreenberg avatar

Watchers

 avatar  avatar

Forkers

ajgreenb

htmeld.js's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.