Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

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

Open
sparkmediatech opened this issue Jul 16, 2022 · 2 comments
Open

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

sparkmediatech opened this issue Jul 16, 2022 · 2 comments

Comments

@sparkmediatech
Copy link

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?

@rajeshbjgowda
Copy link

have u got solution ?

@sparkmediatech
Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants