angular-alloyeditor

0.0.4 • Public • Published

angular-alloyeditor

Build Status Coverage Status

Dependency Status DevDependency Status License

AlloyEditor directive for Angular.

Install

Using Bower

bower install --save angular-alloyeditor

Using NPM

npm install --save angular-alloyeditor

Usage

Example

HTML:

<!-- Load files. -->
<script src="angular/angular.min.js"></script>
<script src="alloyeditor/dist/alloy-editor/alloy-editor-all-min.js"></script>
<script src="angular-alloyeditor.js"></script>
 
<div ng-controller="MyController">
  <alloy-editor id="myEditor" name="myEditor" ng-model="model.content"></alloy-editor>
</div>

JavaScript:

angular
  .module('app', ['alloyeditor'])
  .controller('MyController', MyController);
 
function MyController() {
  var vm = this;
  vm.model = {
    content: '<h1>AlloyEditor</h1><p>Yes, you can edit this content. <strong>Right here and right now</strong>.</p>'
  };
}

Settings

  • ng-model: binding the view into the model.
  • readonly: is a property that it allows you enable or disable editor.
  • onready: call this function after create instance of the editor.
  • config: allows you to configure the editor in the way you prefer.

License

The angular-alloyeditor project is under MIT license.

Package Sidebar

Install

npm i angular-alloyeditor

Weekly Downloads

0

Version

0.0.4

License

MIT

Last publish

Collaborators

  • thiagogarbazza