/ng2-ckeditor

Angular2 CKEditor component

Primary LanguageJavaScriptMIT LicenseMIT

Angular2 - CKEditor component

Use the CKEditor (4.x) wysiwyg in your Angular2 application.

Installation

  • Include CKEditor javascript files in your application
  • Install ng2-ckeditor
    • JSPM : jspm install ng2-ckeditor=github:chymz/ng2-ckeditor
    • NPM : npm install ng2-ckeditor

Sample (ES6)

import {Component} from 'angular2/core';
import {CKEditor} from 'ng2-ckeditor';

@Component({
  selector: 'sample',
  directives: [CKEditor],
  template: `<ckeditor [(ngModel)]="ckeditorContent" [config]="{uiColor: '#99000'}"></ckeditor>`
})
export class Sample{
  constructor(){
    this.ckeditorContent = `<p>My HTML</p>`;
  }
}

Configuration

export var config = {
    uiColor: '#990000'
}