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](https://private-user-images.githubusercontent.com/71933801/301130270-270b209f-e125-4605-8bc1-4228d3e5592f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDg2MDg5MzksIm5iZiI6MTcwODYwODYzOSwicGF0aCI6Ii83MTkzMzgwMS8zMDExMzAyNzAtMjcwYjIwOWYtZTEyNS00NjA1LThiYzEtNDIyOGQzZTU1OTJmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjIyVDEzMzAzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE5NGQ1MzAxODhkZDAzMTkyOWFmNjIwODU4NWNmZGNhZDUyZTRlODA5MjgyMjM4ZGI5YTExYjZkM2I4NmU1YTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.SPYcSvyXMpdjtDOkorSV91NX5I-Ltfbum6BK4wySj64)
Can anyone help me with this???
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
Duplicate: ckeditor/ckeditor5#15783