Skip to content

Cannot get the same CSS color style as shown on https://uiwjs.github.io/react-codemirror/ #715

@yelnyafacee

Description

@yelnyafacee

Hi, I want to get the same color CSS styling as shown on https://uiwjs.github.io/react-codemirror/ for theme: dark and language: JSON

Image

But when I tried it with react-codemirror ("@uiw/react-codemirror": "^4.23.8"):

                        <CodeMirror
                            value={{ JSON .... }}
                            minHeight={"120px"}
                            theme={basicDark}
                            extensions={[
                                basicDark,
                                javascript({ jsx: true }),
                                // EditorView.lineWrapping
                            ]}
                            onChange={onChange}
                        />

it looks like this instead:

Image

On the online example the HTML for the JSON "message": "Network Error" have seperate CSS classes for the JSON key and value:

Image

Image

But the one on my localhost both JSON key and value have the same class:

Image

Image

It seems my localhost react-codemirror is missing alot of classes and styling, why is that?

Does anyone know why this is happening?

Why is it that the outcome is different from the example shown on https://uiwjs.github.io/react-codemirror/?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions