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.79k stars 3.64k forks source link

Classic editor with React is broken in 34.1.0 and 33.0.0 (react version 5.0.2) - Failed to recognize value `undefined` for property `Regional_Indicator` #11941

Open ortonomy opened 2 years ago

ortonomy commented 2 years ago

📝 Provide detailed reproduction steps (if any)

codesandbox: https://codesandbox.io/s/smoosh-http-eoww0l?file=/src/CK.jsx stack overflow (not me, someone else) https://stackoverflow.com/questions/71523282/failed-to-recognize-value-undefined-for-property-regional-indicator-ckedito

follow steps here: https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/frameworks/react.html

✔️ Expected result

Editor loads

❌ Actual result

Editor throws a JS error:

/node_modules/@ckeditor/ckeditor5-build-classic/build/ckeditor.js: Failed to recognize valueundefinedfor propertyRegional_Indicator`.

❓ Possible solution

works if you downgrade to version 32

📃 Other details


If you'd like to see this fixed sooner, add a 👍 reaction to this post.

FilipTokarski commented 2 years ago

Hi, I checked it and had zero errors when running classic editor build with React according to the guide. It seems that the error does not come from the CKEditor itself (some problem with cosedansbox?). Could you confirm that when running it locally everything works fine for you as well?

charpeni commented 1 year ago

I have the same issue with CodeSandbox and I can confirm that running the same example locally is working as expected.

gmartpad commented 1 year ago

Any updates?

FilipTokarski commented 1 year ago

@gmartpad were you able to reproduce this error locally and can share detailed steps?

Loving-Vincent commented 1 year ago

I've resolved it by publish my build package to npmjs.com. :shipit:

A bit complicated but works well.

  1. Build a version using CKEditor 5 online builder and download it locally. You can also do this by modifying the predefined build.
  2. Change the name in package.json and publish it to npmjs.com.
  3. npm i <your-package-name> -S in your project.
- import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
+ import ClassicEditor from '<your-package-name>';

Done! :partying_face:

Tips: Don't forget to run npm run build and republish the package after updating the CKEditor's code.