# PageDown-Bootstrap

An extension of Pagedown to neatly integrate into Twitter Bootstrap for a WYSIWYG Markdown editor. This project is a fork of the work of Sam Willis.

This project is hosted on GitHub where issues can be reported. It is released under the MIT License.

Fork on GitHub

## Requirements

- jQuery 1.9+ (you know you should be keeping it more up-to-date).
- Bootstrap 3.0+
- FontAwesome 4.0+

## Basic usage

## Options

Name | Type | Default | Options/Description
--- | --- | --- | ---
sanitize | boolean | true | true or false, enables or disables sanitization of HTML
help | function | null | A function to be called when the help button it clicked. Null precludes the rendering of the help button.
hooks | array | [] | An array of objects that define hooks for the converter. Each object should define a string, 'event', and a function, 'callback'. A full list of events can be found here.

## Styling

All of the created elements are wrapped in nice helpful HTML tags as defined:

div.wmd-panel
  A wrapper around all of the elements of the textarea, button bar, and preview
div.wmd-button-bar
  A wrapper that contains the editor's button bar.
textarea.wmd-input
  The textarea that has been transformed into an editor
div.wmd-preview
  A wrapper for the preview generated by the editor

## Demo

### 1. This is the basic editor

This is the *first* editor. ------------------------------ Just plain **Markdown**, except that the input is sanitized: <marquee>I'm the ghost from the past!</marquee>

#### Code:

### 2. This is a custom editor

This is the *second* editor. ------------------------------ It has a plugin hook registered that surrounds all words starting with the letter A with asterisks before doing the Markdown conversion. Another one gives bare links a nicer link text. User input isn't sanitized here: <marquee>I'm the ghost from the past!</marquee> http://google.com http://stackoverflow.com It also includes a help button.

#### Code: