SimpleMDE for AngularJS
A simple directive to bind SimpleMDE to ng-model
. If you want support for something, please open an issue!
Installation
bower install simplemde-angular --save
<script src="bower_components/simplemde/dist/simplemde.min.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/simplemde-angular/dist/simplemde-angular.js"></script>
var app = angular.module('app', ['simplemde']);
Usage
<textarea simplemde='{spellChecker: false}'></textarea>
<textarea simplemde='options'></textarea>
<textarea simplemde ng-model='text'></textarea>
app.directive('custom-simplemde', [function(){
return {
restrict: 'A',
require: 'simplemde',
link: function(scope, element, attrs, simplemde) {
simplemde.get() // => SimpleMDE instance
simplemde.rerenderPreview()
}
}
}]);
Contributing
git clone https://github.com/hansottowirtz/simplemde-angular.git
cd simplemde-angular
npm install
bower install
Make changes to src/index.js
, then
gulp build
You can use bower link
to use your package locally.