jsoneditor-react icon indicating copy to clipboard operation
jsoneditor-react copied to clipboard

Do not hardcode css

Open maciejmiklas opened this issue 4 years ago • 11 comments

There is hardcoded css import: import 'jsoneditor/dist/jsoneditor.css';

This makes any css customisation harder. Please remove this import so that we can import css of our choice.

maciejmiklas avatar Sep 23 '20 05:09 maciejmiklas

I agree! I have found a work around that seems to work for anyone wondering. Passing CSS through htmlElementProps seems to work. But it isn't the best solution obviously.

vaultec81 avatar Oct 10 '20 23:10 vaultec81

Maybe someone has workaround? I would like to change the .jsoneditor-menu { background-color: #4b4b4b } and cannot do it through htmlElementProps

PunKHS avatar Feb 19 '21 07:02 PunKHS

You might be able to go into the CSS code in the node_modules folder, or change the properties of the jsoneditor-menu class through javascript if that's possible.

vaultec81 avatar Feb 19 '21 18:02 vaultec81

can't import any css file in node_modules in next js

SeeThruHead avatar Mar 30 '21 15:03 SeeThruHead

would be great, this adds a ton of css and makes lazy loading of the css really hard.

SimonKlausLudwig avatar Apr 21 '21 15:04 SimonKlausLudwig

@SeeThruHead I have the same issue. Found a solution?

NixBiks avatar May 06 '21 10:05 NixBiks

no we didn't use this because of the issue

SeeThruHead avatar May 06 '21 13:05 SeeThruHead

It should be that hard to exclude the css file right ? Please take this into account..

SimonKlausLudwig avatar Jun 11 '21 10:06 SimonKlausLudwig

is it possible to exclude css for next.js apps?

KirillSuhodolov avatar May 14 '22 23:05 KirillSuhodolov

@SeeThruHead did you find an alternative you liked that works with next js?

anavgagneja avatar May 25 '22 23:05 anavgagneja

@anavgagneja this may help https://github.com/tsukhu/jsoneditor-react-ext

amiram avatar Jul 03 '23 15:07 amiram