When incorporating Angular 18 with CKEditor 5 and Material Design, I encountered a problem when trying to add the SourceEditing plugin to the CKEDITOR config.
I am wondering if anyone else has experienced the following errors:
COMPILATION ERRORS
./node_modules/@ckeditor/ckeditor5-core/theme/icons/align-bottom.svg:1:0 - Error: Module parse failed: Unexpected token (1:0)
An appropriate loader may be needed to handle this file type as currently no loaders are configured. Refer to https://webpack.js.org/concepts#loaders
(similar issue occurring for every SVG file in CKEditor)
HTML
<ckeditor [editor]="Editor" [config]="{ plugins: [sourceEditing], toolbar: [ 'bold', 'italic', 'sourceEditing' ] }" />
TYPESCRIPT
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
import { SourceEditing } from '@ckeditor/ckeditor5-source-editing';
export class SomethingSomethingComponent implements OnInit {
public Editor = ClassicEditor;
public sourceEditing = SourceEditing;
constructor() {
}
}