Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

ionparticle/angular-ckeditor

 
 

Repository files navigation

angular-ckeditor

Build Status Dependency Status devDependency Status

CKEditor directive for Angular.

Install

Using bower

bower install angular-ckeditor

Usage

HTML:

<!-- Load files. -->
<script src="angular.js"></script>
<script src="angular-ckeditor.js"></script>

<div ng-controller="CkeditorCtrl">
  <div ckeditor="options" ng-model="content" ready="onReady()"></div>
</div>

JavaScript:

angular.module('controllers.ckeditor', ['ckeditor'])
.controller('CkeditorCtrl', function ($scope) {

  // Editor options.
  $scope.options = {
    language: 'en',
    allowedContent: true,
    entities: false
  };

  // Called when the editor is completely ready.
  $scope.onReady = function () {
    // ...
  };
});

"ckeditor" directive

  • "ckeditor" Specify editor options. Accepts an Object.
  • "ng-model" Binded scope variable.
  • "ready" Called when the editor is completely ready. Accepts an Angular expression.
  • Inline editing mode is enabled if element has a contenteditable attribute set to true.

License

MIT

About

CKEditor directive for Angular.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%