ckeditor/ckeditor5-react

Issue - CKEditor can't be used as JSX component

Srijit1998 opened this issue · 5 comments

I am facing an issue with CKEditor version 6.1.0 while working in a React SPFx project. The error says 'CKEditor cannot be used as a JSX component'. Below is the package.json for my project:

{
"name": "ck-editor-app",
"version": "0.0.1",
"private": true,
"engines": {
"node": ">=16.13.0 <17.0.0"
},
"main": "lib/index.js",
"scripts": {
"build": "gulp bundle",
"clean": "gulp clean",
"test": "gulp test"
},
"dependencies": {
"@ckeditor/ckeditor5-build-classic": "^41.0.0",
"@ckeditor/ckeditor5-react": "^6.1.0",
"@microsoft/sp-core-library": "1.17.1",
"@microsoft/sp-lodash-subset": "1.17.1",
"@microsoft/sp-office-ui-fabric-core": "1.17.1",
"@microsoft/sp-property-pane": "1.17.1",
"@microsoft/sp-webpart-base": "1.17.1",
"office-ui-fabric-react": "^7.199.1",
"react": "17.0.1",
"react-dom": "17.0.1",
"tslib": "2.3.1"
},
"devDependencies": {
"@microsoft/eslint-config-spfx": "1.17.1",
"@microsoft/eslint-plugin-spfx": "1.17.1",
"@microsoft/rush-stack-compiler-4.5": "0.4.0",
"@microsoft/sp-build-web": "1.17.1",
"@microsoft/sp-module-interfaces": "1.17.1",
"@rushstack/eslint-config": "2.5.1",
"@types/react": "17.0.45",
"@types/react-dom": "17.0.17",
"@types/webpack-env": "~1.15.2",
"ajv": "^6.12.5",
"eslint": "8.7.0",
"eslint-plugin-react-hooks": "4.3.0",
"gulp": "4.0.2",
"typescript": "4.5.5"
}
}

My import statement -> import { CKEditor } from '@ckeditor/ckeditor-react'

Error: TS2786: 'CKEditor' cannot be used as a JSX component.

image

Can anyone help me with this???

@FilipTokarski @mdabkowska88

Facing similar issue in my spfx project too.. node 16
Spfx 1.16

Ckeditor version 6.1.0

Poor performance!!! I have been facing this issue for a long time with above mentioned ckeditor and node versions. Such a glitchy text editor

Facing the same issue for some time now.

Has anyone else faced this too? With node 16 and SPFx 1.16

Upgrading the CK Editor to 6.1.0 - it's throwing unsolvable errors. Can anyone help if they are also facing the same