I want to use draft.js in my project. It has its own css which I also need to import. In the documentation it is said:
This CSS should be included when rendering the editor, as these styles set defaults for text alignment, spacing, and other important features.
id
to the editor so that I can style it (eg. border
, padding
, min-height
, etc)Draft. js is a framework for building rich text editors in React, powered by an immutable model and abstracting over cross-browser differences.
Depending on your setup, you should be able to include or import the Draft.css in the index.js file.
...
import 'draft-js/dist/Draft.css';
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With