Angular directive for simditor.
JavaScript
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist/js
src/js
.gitignore init Oct 27, 2015
LICENSE
README.md
bower.json to v1.0.2 Oct 28, 2015
gulpfile.js rename Oct 28, 2015
package.json

README.md

ng-simditor

Angular directive for simditor.

Install

bower install simditor --save
bower install ng-simditor --save

Usage

<link rel="stylesheet" href="bower_components/simditor/styles/simditor.css" />

<script src="bower_components/simple-module/lib/module.js"></script>
<script src="bower_components/simple-hotkeys/lib/hotkeys.js"></script>
<script src="bower_components/simditor/lib/simditor.js"></script>
<script src="bower_components/ng-simditor/dist/js/ng-simditor.js"></script>
angular
.module('app', ['ngSimditor'])
.config(function($provide) {

  // simditor global options customize
  $provide.decorator('simditorOptions', ['$delegate', function(simditorOptions) {
    simditorOptions.toolbar = [
      'title',
      'bold',
      'italic',
      'underline',
      'strikethrough',
      'color',
      'ol',
      'ul',
      'blockquote',
      'code',
      'table',
      'link',
      'image',
      'hr',
      'indent',
      'outdent',
      'alignment',
    ];

    simditorOptions.toolbarFloat = false;
    return simditorOptions;
  }]);

});
<simditor ng-model="content" placeholder="hahahahah"></simditor>

<!-- OR -->

<simditor ng-model="content" options="{placeholder:'hahahahah',...}"></simditor>

Options

Check more Options for ng-simditor.