Angular2 - CKEditor component
Use the CKEditor (4.x) wysiwyg in your Angular2 application.
(Works with new forms API / Angular rc4)
Installation
- Include CKEditor javascript files in your application
- Install ng2-ckeditor
- JSPM/Github :
jspm install ng2-ckeditor=github:chymz/ng2-ckeditor
- JSPM/NPM :
jspm install npm:ng2-ckeditor
- NPM :
npm install ng2-ckeditor
Sample (ES2016+)
import {Component} from '@angular/core';
import {CKEditor} from 'ng2-ckeditor';
@Component({
selector: 'sample',
directives: [CKEditor],
template: `
<ckeditor
[(ngModel)]="ckeditorContent"
[config]="{uiColor: '#99000'}"
(change)="onChange($event)"
(ready)="onReady($event)"
debounce="500">
</ckeditor>
`
})
export class Sample{
constructor(){
this.ckeditorContent = `<p>My HTML</p>`;
}
}
Other samples :
Configuration
Licence
See LICENCE
file