“You may need an appropriate loader..” error when adding custom plugin to ckeditor5 in Angular

I am using a custom build of ckEditor5 for Angular which is stored in ckeditor.d.ts locally:

import { ClassicEditor } from '@ckeditor/ckeditor5-editor-classic';
import { Alignment } from '@ckeditor/ckeditor5-alignment';
import { Autoformat } from '@ckeditor/ckeditor5-autoformat';
import { Bold, Italic, Underline } from '@ckeditor/ckeditor5-basic-styles';
import { BlockQuote } from '@ckeditor/ckeditor5-block-quote';
import { CloudServices } from '@ckeditor/ckeditor5-cloud-services';
import type { EditorConfig } from '@ckeditor/ckeditor5-core';
import { Essentials } from '@ckeditor/ckeditor5-essentials';
import { Heading } from '@ckeditor/ckeditor5-heading';
import { Indent } from '@ckeditor/ckeditor5-indent';
import { Link } from '@ckeditor/ckeditor5-link';
import { List, ListProperties } from '@ckeditor/ckeditor5-list';
import { Paragraph } from '@ckeditor/ckeditor5-paragraph';
import { PasteFromOffice } from '@ckeditor/ckeditor5-paste-from-office';
import { Table, TableToolbar } from '@ckeditor/ckeditor5-table';
import { TextTransformation } from '@ckeditor/ckeditor5-typing';
import { Undo } from '@ckeditor/ckeditor5-undo';
declare class CustomClassicEditor extends ClassicEditor {
    static builtinPlugins: (typeof Alignment | typeof Autoformat | typeof BlockQuote | typeof Bold | typeof CloudServices | typeof Essentials | typeof Heading | typeof Indent | typeof Italic | typeof Link | typeof List | typeof ListProperties | typeof Paragraph | typeof PasteFromOffice | typeof Table | typeof TableToolbar | typeof TextTransformation | typeof Underline | typeof Undo)[];
    static defaultConfig: EditorConfig;
}
export default CustomClassicEditor;

I have added a custom plugin locally as well:

import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';

export default class CustomPlugin extends Plugin {
    init() {
        const editor = this.editor;
        editor.ui.componentFactory.add('customPlugin', locale => {
            const view = new ButtonView(locale);
            view.set({
                label: 'Custom Plugin',
                // icon: icon,
                tooltip: true
            });
            // Callback executed once the button is clicked
            view.on('execute', () => {
                this.doTheThings();
            });
            return view;
        });
    }
    doTheThings() {
        // TODO: the things
    }
}

Then I add this custom Plugin to my editorConfig:

<ckeditor                        
 [editor]="Editor" 
 [config]="editorConfig"
 ...
this.editorConfig =  {
 alignment: {
  options: ['left', 'right', 'center', 'justify']
 },
 extraPlugins: [CustomPlugin],
 toolbar: ['undo','redo','heading','|','bold','italic','underline','alignment','link','bulletedList','numberedList','|','indent','outdent','|','blockQuote','insertTable','|','customPlugin','|'],

and I am getting the following build errors:

You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|  */
| 
> @import "../../mixins/_unselectable.css";
| @import "../../mixins/_dir.css";
| 

./node_modules/@ckeditor/ckeditor5-ui/theme/components/icon/icon.css:6:0 - Error: Module parse failed: Unexpected token (6:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|  */
| 
> .ck.ck-icon {
|       vertical-align: middle;
| }

./node_modules/@ckeditor/ckeditor5-ui/theme/globals/globals.css:6:0 - Error: Module parse failed: Unexpected character '@' (6:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|  */
| 
> @import "./_hidden.css";
| @import "./_zindex.css";
| @import "./_transition.css";



** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/operators **


× Failed to compile.
✔ Browser application bundle generation complete.

Initial Chunk Files | Names   | Raw Size
runtime.js          | runtime |  8.48 kB | 

4 unchanged chunks

Build at: 2024-06-11T17:00:03.502Z - Hash: 2efae6870512eaab - Time: 1614ms

./node_modules/@ckeditor/ckeditor5-ui/theme/components/button/button.css:6:0 - Error: Module parse failed: Unexpected character '@' (6:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|  */
| 
> @import "../../mixins/_unselectable.css";
| @import "../../mixins/_dir.css";
| 

./node_modules/@ckeditor/ckeditor5-ui/theme/components/icon/icon.css:6:0 - Error: Module parse failed: Unexpected token (6:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|  */
|
> .ck.ck-icon {
|       vertical-align: middle;
| }

./node_modules/@ckeditor/ckeditor5-ui/theme/globals/globals.css:6:0 - Error: Module parse failed: Unexpected character '@' (6:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|  */
|
> @import "./_hidden.css";
| @import "./_zindex.css";
| @import "./_transition.css";

ckeditor packages:

    "@ckeditor/ckeditor5-angular": "^7.0.1",
    "@ckeditor/ckeditor5-basic-styles": "^41.2.1",
    "@ckeditor/ckeditor5-build-classic": "^41.4.2",
    "@ckeditor/ckeditor5-core": "^41.2.1",
    "@ckeditor/ckeditor5-editor-classic": "^41.4.2",
    "@ckeditor/ckeditor5-engine": "^41.2.1",
    "@ckeditor/ckeditor5-highlight": "^41.2.1",
    "@ckeditor/ckeditor5-ui": "^41.4.2",
    "@ckeditor/ckeditor5-utils": "^41.2.1",
    "@ckeditor/ckeditor5-watchdog": "^41.2.1",

ng version output:

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.1602.14
@angular-devkit/build-angular      16.2.14
@angular-devkit/core               16.2.14
@angular-devkit/schematics         16.2.14
@angular/cdk                       16.2.14
@angular/cli                       16.2.14
@angular/material                  16.2.14
@angular/material-moment-adapter   16.2.14
@schematics/angular                16.2.14
ng-packagr                         16.2.3
rxjs                               7.5.7
typescript                         5.1.6
zone.js                            0.13.3

Has anyone else had this problem and can help with resources and/or tips to fix this?

Thanks a lot!

in the the ts file where my ckeditor tag is:

  • adding the custom plugin to the plugins array

In the custom build of ckEditor:

  • adding the custom plugin to the builtinPlugins array (different errors)

I was expecting to see a ButtonView button show up at the end of my ckeditor toolbar

New contributor

kevin2themystic is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật