You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While this is not an issue for a bug, it is one for a feature request. We all know a big part of the react.js community uses TailwindCSS for styling, and even more have to interact with it in one way or the other (even if they don't use it personally on their projects).
The current docs suggests importing import '../node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css'; into your code to make the Editor object have some defualt styling and then encourages users to edit that file, or better still use the api provided for styling:
wrapperClassName: class applied around both the editor and the toolbar
editorClassName: class applied around the editor
toolbarClassName: class applied around the toolbar
wrapperStyle: style object applied around both the editor and the toolbar
editorStyle: style object applied around the editor
toolbarStyle: style object applied around the toolbar
While the above works, the suggestions aren't great because one has to go through a lot of customisations just to make simple things work and potentially break out things.
So my point is somewhere in the docs should give a link to the equivalent tailwindcss (i.e. equivalent to import '../node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css';) file below for users to immediately download and start customising the editor as they want, instead of importing styles from node_modules, something most users haven't done in their development at all, hence it will look odd to most.
While this is not an issue for a bug, it is one for a feature request. We all know a big part of the react.js community uses TailwindCSS for styling, and even more have to interact with it in one way or the other (even if they don't use it personally on their projects).
The current docs suggests importing
import '../node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
into your code to make theEditor
object have some defualt styling and then encourages users to edit that file, or better still use the api provided for styling:wrapperClassName
: class applied around both the editor and the toolbareditorClassName
: class applied around the editortoolbarClassName
: class applied around the toolbarwrapperStyle
: style object applied around both the editor and the toolbareditorStyle
: style object applied around the editortoolbarStyle
: style object applied around the toolbarWhile the above works, the suggestions aren't great because one has to go through a lot of customisations just to make simple things work and potentially break out things.
So my point is somewhere in the docs should give a link to the equivalent tailwindcss (i.e. equivalent to
import '../node_modules/react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
) file below for users to immediately download and start customising the editor as they want, instead of importing styles fromnode_modules
, something most users haven't done in their development at all, hence it will look odd to most.The text was updated successfully, but these errors were encountered: