draft-js icon indicating copy to clipboard operation
draft-js copied to clipboard

How do I set the image default width and height of an image?

Open kingsleydev19 opened this issue 3 years ago • 2 comments

I am using @draft-js-plugins/image plugin and @draft-js-plugins/editor to display contents created with react-draft-wysiwyg. The @draft-js-plugins/image plugin is to display image inside the @draft-js-plugins/editor. The problem I have now is that I want to have a set default image size for the image. It is not picking the size coming from the react-draft-wysiwyg when the image was uploaded. I am new to this. How can I solve this?

kingsleydev19 avatar Jul 16 '22 17:07 kingsleydev19

have u got solution ?

rajeshbjgowda avatar Oct 21 '22 09:10 rajeshbjgowda

I simply mentioned the name of the div that is housing the editor and called the img tag in css and styled it. It worked. For instance, if I have the editor inside this div called 'readOnlyEditor-div'. I simply go to css and do this: .readOnlyEditor-div img{ width:; height : ; }

etc.

kingsleydev19 avatar Oct 22 '22 15:10 kingsleydev19