Skip to content
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

How can I use custom editor? #131

Closed
ladislavbili opened this issue Jan 21, 2020 · 2 comments
Closed

How can I use custom editor? #131

ladislavbili opened this issue Jan 21, 2020 · 2 comments
Labels
resolution:expired This issue was closed due to lack of feedback.

Comments

@ladislavbili
Copy link

So I've used this webpage https://ckeditor.com/ckeditor-5/online-builder/ to generate editor with my preferences. Downloaded the zip file and my question is, how do I use it in react? Example for html works just fine but not in react.
Directly import from build folder into ofc crashed as it was too large. So I tried different approaches.
Last one that looks like it should work was to install it as a module using npm. So I installed it and it went just fine. Its in node modules as "ckeditor5-custom-build", package.json, "ckeditor5-custom-build": "file:src/components/ckeditor5" webpage loads just fine but when i try to import it in any way it doesn't work.
import CKEditor from 'ckeditor5-custom-build';
also tried
import {ClassicEditor} from 'ckeditor5-custom-build';
All I get is Module not found: Can't resolve 'ckeditor5-custom-build' in. How can I use this?

I also tried just directly using it, installing all of the dependencies creating the file linked below in my project but problem is, the dependencies don't even load, with message that one of the modules was not able to import css from the other module, but when I looked it was there. Still I think the first approach I tried should somehow work, I have no idea how though.

Here is the code of generated component so you can imagine what libraries I used.
https://gist.github.com/ladislavbili/68e1c6126ae6daa781fed1469352c12e

@Mgsy
Copy link
Member

Mgsy commented Jan 28, 2020

Hi! Please, make sure that you import the compiled file which is in build directory of your package. The following import should work:

import ClassicEditor from 'ckeditor5-custom-build/build/ckeditor';

@Mgsy Mgsy added pending:feedback This issue is blocked by necessary feedback. type:question labels Jan 28, 2020
@FilipTokarski
Copy link
Member

Closing due to lack of activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:expired This issue was closed due to lack of feedback.
Projects
None yet
Development

No branches or pull requests

3 participants