markdown /

Filename Size Date modified Message
wmd
1.6 KB
1.4 KB
32.5 KB
123 B
# Markdown Library

Tools for processing the
[Markdown](http://daringfireball.net/projects/markdown/) language.


## makeHTML()

To convert markdown text into HTML, use the `makeHTML()` function:

    use('markdown');
    ...
    var text = 'Markdown *rocks*.';
    var html = markdown.makeHTML(text);
   

## WMD

The [Wysiwym Markdown Editor](http://wmd-editor.com/) is a simple,
lightweight HTML editor for blog comments, forum posts, and basic
content management.

To install the editor, include `wmd.js` right before your closing
`<body>` tag:

    <script type="text/javascript"
            src="http://static.akshell.com/code/release/markdown/wmd/wmd.js">
    </script>

By default, WMD will turn the first textarea on your page into an
editor. You can modify this behavior with the `wmd-ignore` class,
described below.


### Adding Live Preview

Paste this code wherever you want your live preview to appear:

    <div class="wmd-preview"></div>

You can mix "wmd-preview" with your own class names to make applying
CSS easier.

Example:

    <div class="myClass <span class="highlight">wmd-preview</span>" id="myId"></div>


### Special Class Names

You can use the following class names to control WMD's auto-start
behavior:

`wmd-ignore` - Add to a textarea to prevent WMD from turning it into
an editor.

`wmd-preview` - Add to a div to turn show a live preview.

`wmd-output` - Add to a textarea or div to turn show the HTML output.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.