Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is there an uneeded <div>? #52

Open
DanielHabenicht opened this issue Mar 9, 2021 · 2 comments
Open

Why is there an uneeded <div>? #52

DanielHabenicht opened this issue Mar 9, 2021 · 2 comments

Comments

@DanielHabenicht
Copy link

Hi!
While trying to incorporate the editor into my application I came across this <div> wrapping the editor.

image
It is set here

return React.createElement(
tag,
{
...htmlElementProps,
ref: this.setRef
}
);

It seems rather unneeded and prevents the expansion of the Editor, which I think is not expected behaviour, implied by the CSS set on the jsoneditor class:
image

I think the rogue div should be removed, what do you think?

@stevegg
Copy link

stevegg commented May 28, 2021

+1

@matburnham
Copy link

matburnham commented Jul 29, 2021

Had this problem too. Eventually figured I could set the class name and control it myself with:

<JsonEditor
  ...
  htmlElementProps={{className: 'jsoneditor-container'}}
/>

Or you can change the element type with the tag attribute.

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

No branches or pull requests

3 participants