Search code examples
angularcomponents

'CKEditor 4.x is missing (http://ckeditor.com/)' warning in using ng2-ckeditor, angular 4


I am going to use ng2-ckeditor plugin for my angular 4 project. I read guide and there was configuration of systemjs file. But I couldn't find systemjs in my angular 4 cli project. So I did other things mentioned in guide except systemjs config. And the last result was simple textbox and warning

'CKEditor 4.x is missing (http://ckeditor.com/)'

These are all I have done.

1)    /*added this script to my component html file*/
<script src="https://cdn.ckeditor.com/4.5.11/full/ckeditor.js"></script>
2) 
npm install ng2-ckeditor
3) set appmodule
import { CKEditorModule } from 'ng2-ckeditor';

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

4) use component
      <ckeditor [(ngModel)]="content" debounce="500">
      <p>Hello <strong>world</strong></p>
      </ckeditor>

I want to know how to set systemjs even I can't find systemjs file in my project And is there anyway without setting this? Best Regards


Solution

  • Import the script in your index.html

    <script src="https://cdn.ckeditor.com/4.6.1/full/ckeditor.js"></script>