A simple directive to bind SimpleMDE to ng-model
. If you want support for something, please open an issue!
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']);
<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()
}
}
}]);
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.