admin

Please wait...

edit CKEditor Integration

info CKEditor Overview

MediDash integrates the powerful and versatile CKEditor to provide a rich text editing experience. This guide will walk you through the process of installing and using the CKEditor in your Angular application.

get_app Installation

To get started, you need to install the CKEditor Angular component and the classic editor build using npm:


npm install --save @ckeditor/ckeditor5-angular
npm install --save @ckeditor/ckeditor5-build-classic

settings_applications Module Integration

Next, you need to add the CKEditorModule to your application module's imports:


import { CKEditorModule } from '@ckeditor/ckeditor5-angular';

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

developer_mode Component Integration

Now, import the editor build in your Angular component and assign it to a public property so it becomes accessible in the template:


import * as ClassicEditor from '@ckeditor/ckeditor5-build-classic';

@Component({
    // ...
})
export class MyComponent {
    public Editor = ClassicEditor;
    // ...
}

code Template Integration

Finally, use the <ckeditor> tag in your template to render the rich text editor:


<ckeditor [editor]="Editor" data="<p>Hello, world!</p>"></ckeditor>

link Helpful Resources

For more information on using CKEditor with Angular, please refer to the official documentation:

Topic URL
CKEditor 5 Angular Integration https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/angular.html