I'm trying to use Draft.js with the Image plugin. Here are my problems. I manage to get it to work, but the styles aren't loaded and the editor takes the whole page and the buttons aren't styled.
I load the styles from the provided CSS
import './Draft.css';
import editorStyles from './editorStyles.css';
import 'draft-js-image-plugin/lib/plugin.css';
But it doesn't do anything.
I'm working with Create React App, so style-loader
and css-loader
should be working fine.
Thanks for the help.
About styles in
draft-js-image-plugin/lib/plugin.css
. It looks like a mistake in the plugin documentation. We can read there:But if we check this file in our
node_modules
directory, we see that this file is empty. No any styles.About other styles. Check that you have
Draft.css
andeditorStyles.css
files and this files located in the same directory that your component. Do you have some errors in the console? It would be great if you provide full your code.