Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/doublinglee10/ngx-ourpalm-ckeditor

Angular 2+ Port for the ckeditor http://ckeditor.com
https://github.com/doublinglee10/ngx-ourpalm-ckeditor

Last synced: 16 days ago
JSON representation

Angular 2+ Port for the ckeditor http://ckeditor.com

Awesome Lists containing this project

README

        

# NgxOurpalmCkeditor

Angular 2+ Port for the ckeditor [http://ckeditor.com](http://ckeditor.com)

## Installation

```javascript
npm install ngx-ourpalm-ckeditor --save
```

## Demo1

* Step1: Include CKEditor javascript files in your application

```javascript

```

* Step2: Include CKEditorModule in your main module

```javascript
import { OurpalmCKEditorModule } from 'ngx-ourpalm-ckeditor';

@NgModule({
// ...
imports: [
OurpalmCKEditorModule
],
// ...
})
export class AppModule { }
```

* Step3: Use it in your component

```javascript
import { Component } from '@angular/core';

@Component({
selector: 'sample',
template: `


`
})
export class Sample{
constructor(){
this.ckeditorContent = `

My HTML

`;
}
}
```

## Demo2 (async load ckeditor.js)

* Step1: Include CKEditorModule in your main module

```javascript
import { OurpalmCKEditorModule } from 'ngx-ourpalm-ckeditor';

@NgModule({
// ...
imports: [
OurpalmCKEditorModule
],
// ...
})
export class AppModule { }
```

* Step2: Use it in your component

```javascript
import { Component } from '@angular/core';

@Component({
selector: 'sample',
template: `


`
})
export class Sample{
constructor(){
this.ckeditorContent = `

My HTML

`;
}
}
```

In this way, ckeditor.js will load async by dynamic. So the bundle file would not include ckeditor.js

In order to async load the ckeditor.js, I have to modify the ng2-ckeditor. Modify from the project [ng2-ckeditor](https://github.com/chymz/ng2-ckeditor) , thank a lot.