Closed Byrniee closed 2 years ago
Hi, I tried your code and the only thing I had to change was:
export default class App extends React.Component
instead of
export class App extends React.Component
I would advise checking all imports, because TBH it looks like something on your side and not a bug in the editor. But, if that does not help, we'll need some more information ( step by step description, package.json, webpack config, etc. ) to reproduce the issue.
Hi @FilipTokarski
Changing to a default export didn't help for me. As for a step-by-step, i'm not sure what more I can add. I followed the quick-start instructions on the page i linked in my previous comment. I guess it's because i'm adding it into an existing project?
cc @pomek could you take a look at this?
I'll try to reproduce the issue.
I created an app using CRA. Most probably it was version 3+ since after ejecting, I've got only one webpack config file.
I followed the steps listed in our documentation – https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/react.html#modifying-webpack-configuration – and my app successfully compiled and the editor is displayed on the page.
I'll share files that I had to change/update:
package.json
There are new entries (dependencies and dev dependencies) after installing the required packages. Generated by Yarn.
config/webpack.config.js
I have followed the quick-start guide here to integrate CKEditor with my existing ReactJs project.
I followed the instructions running
npm install --save @ckeditor/ckeditor5-react @ckeditor/ckeditor5-build-classic
to install. This gave me the compile error:I was able to resolve this by running
npm install --save style-loader
. The project now compiles, however I get an error in the browser:I am using a webpack. Please let me know if you need any other information.
My class looks like this (pretty much copied from the quick start guide):