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

Creates two div with class: CodeMirror cm-s-default #178

Open
muratsesen opened this issue Apr 26, 2022 · 2 comments
Open

Creates two div with class: CodeMirror cm-s-default #178

muratsesen opened this issue Apr 26, 2022 · 2 comments

Comments

@muratsesen
Copy link

muratsesen commented Apr 26, 2022

When I implement the basic example in a newly created react app, it creates two separate text fields inside the editor.
This is really weird.
It looks like this:

Toolbar section

| 1 | #this is a text field which can be edited
| 1 | #this is another text field which is also editable

@jaywcjlove
Copy link
Member

@muratsesen I didn't understand what you meant

@berkaycimsir
Copy link

i also faced with this issue
i fixed it with hiding the last one by the css below

    '.cm-s-default:last-child': {
          display: 'none !important',
     },

also i realized that it does not create the second one in production, creates in only local

so i am using this in my project

const StyledMarkdownEditor = styled(MarkdownEditor)({
  ...(!prod
    ? {
        '.cm-s-default:last-child': {
          display: 'none !important',
        },
      }
    : {}),
});

my package versions

    "@uiw/react-markdown-editor": "^4.0.3",
    "next": "latest",
    "next-remove-imports": "^1.0.6",
    "react": "latest",

screenshot of the issue

Screen Shot 2022-04-29 at 03 26 45

also there is an another issue, if i hit enter one time the space does not apply. i need to hit two times to enter to put space check screenshot below

Screen Shot 2022-04-29 at 03 31 06

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