vankop / jsoneditor-react

react wrapper implementation for https://github.com/josdejong/jsoneditor
MIT License
265 stars 106 forks source link

Change size when using ace editor #39

Open tungns0695 opened 4 years ago

tungns0695 commented 4 years ago

How can i change size of this component when using ace editor?

developergunny commented 3 years ago

clear?

bbemis017 commented 3 years ago

I think this sounds like it could be similar to the issue I'm seeing.

When I add the jsonEditor to my application, It does not expand to the full height. image If I set the height for the div that contains the jsonEditor to be 75vh the json editor expands but the content in the ace editor does not image

Update - I just realized that resizing it the way I did worked. But because I tested my css in the browser first the ace editor didn't adjust automatically. So changing the height of the parent div does work

When I remove the ace editor, I can easily set the height of the content the way I want it. So I guess to get back to what I think @tungns0695 question is. Is there a correct way to control the height of the ace editor?

fiskus commented 3 years ago

I use htmlElementProps={{ style: { height: '300px' } }} to control height

VijayMoses2k commented 1 year ago

why I can't change the font size of the Ace Editor using useState hooks in react, I mean I tried it, but it didn't change dynamically in the website when I change it.

is the fontSize property not changeable like that. please someone provide me a solution.