You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

angular-ckeditor

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-ckeditor

CKEditor directive for Angular.

0.3.1
latest
Source
npmnpm
Version published
Weekly downloads
16
45.45%
Maintainers
1
Weekly downloads
 
Created
Source

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 () {
    // ...
  };
});

IMPORTANT NOTICE Angular-ckeditor uses ng-model. If you add an ng-if on the element to whom this directive is attached, changes in the editor won't be forwarded to your code anymore, due to the extra scope created by ng-if. A solution is to explicitely bypass the extra scope : ng-model="$parent.model". See http://stackoverflow.com/questions/18342917/angularjs-ng-model-doesnt-work-inside-ng-if

"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

Keywords

angular

FAQs

Package last updated on 19 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts