12.0.0 • Published 3 years ago

ngx-ckeditor v12.0.0

Weekly downloads
4,578
License
-
Repository
-
Last release
3 years ago

ngx-ckeditor

Travis CI Status

The CKEditor component for angular

Usage

Installation

  • Import CKEditor js file
<script src="//cdn.ckeditor.com/4.7.1/full/ckeditor.js"></script>
  • Install ngx-ckeditor
npm i -S ngx-ckeditor

Sample

Import CKEditorModule module in your main module:

// app.module.ts

import { CKEditorModule } from 'ngx-ckeditor';

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

}

Then use it in your component:

// app.component.html

<ck-editor name="editor1" [(ngModel)]="editorValue" skin="moono-lisa" language="en" [fullPage]="true"></ck-editor>
// app.component.ts

@Component({
  selector: 'app',
  templateUrl: 'app.component.html'
})

export class AppComponent implements OnInit {

  public editorValue: string = '';

  ngOnInit() { }
}

CKEditorComponent Options

TypeNameDataTypeDefault ValueDescription
InputreadonlybooleanfalseEnabled / disable readonly on editor
Inputskinstring'moono-lisa'Set the editor skin
Inputlanguagestring'en'Set the editor language
InputfullPagebooleanfalseEnalbed /disable fullPage mode on editor
Inputconfigobject{}CKEditor's config object, see more
InputinlinebooleanfalseSet the inline mode
Two-wayngModelstringTwo-way binding value

Version Rules (Imports)

In order to match angular version, the ngx-ckeditor version no will same as angular majar version.

  • 0.2.x: for angular 2.x ~ 4.x
  • 0.4.x: for angular 5.x ~ 7.x
  • 8.x.x: for angular 8.x
  • 10.x.x: for angular 10.x
  • 11.x.x: for angular 11.x

How to develop?

git clone https://github.com/HstarComponents/ngx-ckeditor.git

# install deps
npm i

# run dev
npm start

# build demo
npm run build:ngx-ckeditor-examples

# build lib
npm run build:ngx-ckeditor

# test
npm test

# Upgrade angular version
ng update 
ng update @angular/core@12 @angular/cli@12

# Package Publish
npm run build:ngx-ckeditor
cp README.md dist/ngx-ckeditor/README.md && cp CHANGELOG.md dist/ngx-ckeditor/CHANGELOG.md && cd dist/ngx-ckeditor
npm publish

FAQ?

1、Metadata version mismatch found version 4, expected 3

A: That because the lib is build for angular 5.x, it will throw the error when your used angular version is 4.x, please use ngx-ckeditor@0.2.x for angular 4.x.

Issues

Create an issue

Changelog

Changelog

License

MIT License

12.0.0

3 years ago

11.0.0

3 years ago

11.0.1

3 years ago

10.0.0

4 years ago

8.0.0

5 years ago

0.4.0

5 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.3.2

6 years ago

0.2.1

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.1

7 years ago

0.1.0

7 years ago