Reputation: 93
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.
Upvotes: 0
Views: 2659
Reputation: 8509
About styles in draft-js-image-plugin/lib/plugin.css
. It looks like a mistake in the plugin documentation. We can read there:
The plugin ships with a default styling available at this location in the installed package:
node_modules/draft-js-image-plugin/lib/plugin.css
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
and editorStyles.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.
Upvotes: 2