-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Explore convienent way to integrate custom CKEditor 5 build with CRA app #170
Comments
Some interesting stuff - https://medium.com/@adamerose/using-ckeditor-5-in-create-react-app-without-ejecting-cc24ffb3fd9c. |
Hello, everyone! I'm Kostia. Will you allow some icons and .css styles to block GREAT SOFTWARE from widespread adoption? You adding the 'powered by CKEditor' mark, telling that this step will increase the widespread of your editor. As a new dev myself, I come from CRA land, and by reading word 'eject' from CRA in your docs - it immediately throws me off and fires and major 🚩'RED FLAG', which causes thoughts Because I think there are not so many man and woman, who have the same iron balls / unbendable will as you. But styles and icons..., you definitely have more experience that me, but even I know that ejecting is not worth it. I think the problem is in the style loading system. Maybe you can make it optional? If icons is the real issue, why don't you use iconmoon to make a sprite? I think, if you Thank you for attention! It would be beneficial for CRA users of this lib, if you provide initial guidance for steps to improve (to remove the need to 'eject')! I think, some people are willing to help you to migrate to optional styles/icons system, they just do not know where to start! |
Hey @KostiantynO, thanks for reaching out and sharing your feedback. I must say that your message sounds a bit passive-aggressive but I will take the benefit of the doubt here, and answer from the point of you caring about CKEditor. As maintainers of the editor, we need to take into account multiple factors. This project is 8 years old, some decisions were made before React started to be a leading framework, esbuild was not created yet, etc. The editor itself is used in multiple different environments, frameworks, setups, and bundlers. And we need to try to be as agnostic as possible. Speaking of bundlers, we've seen bundlers come and go in the JS world, and it's the additional point where we need to be extremely careful of attaching ourselves to the "proper way" of doing things. For example, CRA is now not recommended on the React side (they are not even linking to it in the docs), and probably will change its purpose (see: facebook/create-react-app#13072). That being said, it's not that we haven't made mistakes or our approach has not become outdated. We are constantly discussing architecture and product challenges in the surrounding dev environment. But unfortunately, it's not as simple as creating a plan and sharing it with the community. The installation paths are one of the main topics currently @Reinmar is leading, and for sure your feedback will be taken into account. Thanks again! |
@Witoso, yes, definitely! Thank you for good points! I wanted to provide my thought process, as a dev who got familiar with CKEditor for the first time! I also prefer Vite⚡, as it is faster :), but the curios side is - I got my hands on some existing code with CRA⚛ :) And I want to use CKEditor, because it provides |
It's the same as installing any other missing dependencies for a React project. Btw if you're not comfortable with ejecting (which I understand), you can also have a separate build step for the editor. You store the editor in a separate folder, and in the react app you only import already built js. |
I think that we can't escape a fact that CRA might be widely used in the development of React apps (#152, #166, #87). It provides worry-less project configuration and development setup for many flavors of the development like adding TypeScript support.
For now, and for the nearest future, CKEditor 5 will not fully support adding plugins to the build. We're somewhere in the road to that but, for instance, adding a widget functionality requires importing stuff.
We provide a way of integrating CKEditor build from source by
eject
from CRA. This operation is scary:and maybe a no-go for some teams. There are alternatives to eject but requires some overhead.
React is widely used and I think that providing this integration is a good way to advertise CKEditor for many projects. However, our build process might not be suitable here.
Some options to consider:
For now, I'd go with 2 (as the least intrusive to CRA) and ckeditor/ckeditor5#667 4.
The text was updated successfully, but these errors were encountered: