ckeditor / ckeditor5

Powerful rich text editor framework with a modular architecture, modern integrations, and features like collaborative editing.
https://ckeditor.com/ckeditor-5
Other
8.7k stars 3.62k forks source link

Struggling to migrate to version 42 on Angular #16655

Open roymichaelu opened 3 days ago

roymichaelu commented 3 days ago

Reproduction steps

Facing a lot of issues, tried to use the documentation, follow migration steps, tried to use your online builder - nothing worked I always ended up having issues like the following:

./node_modules/ckeditor5/dist/ckeditor5.css:19:0 - Error: Module parse failed: Unexpected token (19: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 | For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license | /

:root { | --ck-color-base-foreground: hsl(0, 0%, 98%); | --ck-color-base-background: hsl(0, 0%, 100%);

And also issues like this: 143:34 - error TS2322: Type 'import("/Users/roymichael/Documents/projects/lumix-cloud/web/node_modules/ckeditor5/node_modules/@ckeditor/ckeditor5-core/src/editor/editorconfig").EditorConfig' is not assignable to type 'import("/Users/roymichael/Documents/projects/lumix-cloud/web/node_modules/@ckeditor/ckeditor5-core/src/editor/editorconfig").EditorConfig'.

143 [config]="editorConfig"

Type 'typeof DecoupledEditor' is not assignable to type '{ create(sourceElementOrData: string | HTMLElement, config?: EditorConfig): Promise; }'.

142 <ckeditor [editor]="Editor"



### Current behavior

Not transpiling

### Expected behavior

Success transpile 
Witoso commented 3 days ago

Hey! I'm sorry to see you struggling, to help, ideally we would need some reproducible samples. Furthermore, data about the Angular version, etc.

The error suggests that the webpack cannot read the CSS that you added into the code.

I know there are several options there

The decision depends on your setup, version, etc.

The code that is produced by Typescript 5.0, but it should be readable by lower versions. We would need additional information about the setup. 

Make sure that you bump the Angular integration to version 8. As some duplicated packages may be installed otherwise.