jpuri / react-draft-wysiwyg

A Wysiwyg editor build on top of ReactJS and DraftJS. https://jpuri.github.io/react-draft-wysiwyg
MIT License
6.41k stars 1.16k forks source link

I would like to have control of how I style my displayed data, what is my best approach? #1284

Open sparkmediatech opened 2 years ago

sparkmediatech commented 2 years ago

I used react-draft-wysiwyg to create text and image and send that data to my node.js server, saved in mongodb. Now, I want to retrieve the data and display in reactjs. I tried using the react-draft-wysiwyg Editor and set the readOnly to true since this is for display purpose only. It is working but the issue is that I can't seem to style it as I want. For example, I would like to change the font-family and font size, including text color, spacing etc. This has to match with my application style. How can I go about this? I can't seem to overwrite the default styles. The Editor from draft.js actually responded to my own style and changed the text color, fontFamily, size, spacing, etc. But that editor doesn't seem to display image that are inside the Editor. How can I get the react-draft-wysiwyg Editor to allow me to style the font color, size, fontfamily, space, etc once on display?