AngularJS markdown directive using Showdown.js
Switch branches/tags
Clone or download
btford Merge pull request #54 from tobiaspatton-s4/master
Fix example in file
Latest commit 4e99c3c Aug 31, 2016
Failed to load latest commit information.
.gitignore chore: add .gitignore Apr 21, 2014
.travis.yml chore: add travis config Apr 21, 2014 Fix example in file Aug 31, 2016
bower.json 0.3.1 Dec 4, 2014
karma.conf.js test: add tests Apr 21, 2014
markdown.js 0.3.1 Dec 4, 2014
markdown.spec.js test: using extensions Apr 21, 2014
package.json 0.3.1 Dec 4, 2014

angular-markdown-directive Build Status

Bower Component for a simple AngularJS Markdown directive using Showdown. Based on this excellent tutorial by @johnlinquist.


  1. bower install angular-markdown-directive
  2. Include angular-sanitize.js. It should be located at bower_components/angular-sanitize/.
  3. Include showdown.js. It should be located at bower_components/showdown/.
  4. Include markdown.js provided by this component into your app.
  5. Add btford.markdown as a module dependency to your app.
  6. Insert the btf-markdown directive into your template:
<btf-markdown>#Markdown directive *It works!*</btf-markdown>

You can also bind the markdown input to a scope variable:

<div btf-markdown="markdown">
<!-- Uses $scope.markdown -->

Or include a markdown file:

<div btf-markdown ng-include="''">
<!-- Uses content from -->


You can configure the markdownConverterProvider:

angular.module('myApp', [
config(['markdownConverterProvider', function (markdownConverterProvider) {
  // options to be passed to Showdown
  // see:
    extensions: ['twitter']