Skip to content

Latest commit

 

History

History
86 lines (59 loc) · 2.46 KB

README.md

File metadata and controls

86 lines (59 loc) · 2.46 KB

Description

This directive allows you create elements with behaviour from the pagedown library.

Demo: http://polyptychon.github.io/poly-form-pagedown/

Requirements

Install

You can install this package either with npm or with bower.

npm

npm install --save polyptychon/poly-form-pagedown

Add a stylesheet to your index.html head:

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
<link rel="stylesheet" href="/node_modules/poly-form-pagedown/lib/css/poly-form-pagedown.css">

Add a <script> to your index.html:

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>

<script src="/node_modules/poly-form-pagedown/lib/js/poly-form-pagedown.min.js"></script>

Then add poly-form-pagedown as a dependency for your app:

angular.module('myApp', ['poly-form-pagedown']);

Note that this package is in CommonJS format, so you can require('poly-form-pagedown')

bower

bower install polyptychon/poly-form-pagedown

Add a stylesheet to your index.html head:

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css">
<link rel="stylesheet" href="/bower_components/poly-form-pagedown/lib/css/poly-form-pagedown.css">

Add a <script> to your index.html:

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>

<script src="/bower_components/poly-form-pagedown/lib/js/poly-form-pagedown.min.js"></script>

Then add poly-form-pagedown as a dependency for your app:

angular.module('myApp', ['poly-form-pagedown']);

Documentation

A Markdown editor with realtime preview of the generated HTML.

Attributes
Name Type Default Description
use-preview Boolean true Show/hides preview pane.
<pagedown ng-model="myForm.variable" ng-required="true" rows="20" id="pagedown_id">
<!-- [markdown] -->
</pagedown>