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

Next.js problem while writing an article #608

Open
BadmWe opened this issue Jan 1, 2024 · 6 comments
Open

Next.js problem while writing an article #608

BadmWe opened this issue Jan 1, 2024 · 6 comments

Comments

@BadmWe
Copy link

BadmWe commented Jan 1, 2024

Hello, I've added code from https://github.com/uiwjs/react-md-editor?tab=readme-ov-file#support-nextjs on my open-source website, but it doesn't work correctly. I have the strange blue line on the left side, and it's interferes with writing text further down the markdown.

My code here https://github.com/BadmWe/dspyt-webpage/blob/eb597c6452f9d9a9304f1f6fc4b1962c6c9680e1/dspyt/pages/markdown/index.js#L6-L74

Image

When I try to write a text further, I have this problem
image

Actually, I tried to look at your finished code here
image

https://codesandbox.io/embed/nextjs-example-react-md-editor-https-github-com-uiwjs-react-md-editor-issues-516-1z56px?fontsize=14&hidenavigation=1&theme=dark

But it doesn't work
image

I have read through #52
and think that

const MDEditor = dynamic(
  () => import("@uiw/react-md-editor"),
  { ssr: false }
);

messes up css

@BadmWe
Copy link
Author

BadmWe commented Jan 1, 2024

Now I have another problem, now with the cursor, look, it is not displayed correctly for one character
image
I clicked on the text at the end of the line, but the cursor remained one character ahead
image

@BadmWe
Copy link
Author

BadmWe commented Jan 1, 2024

The same problem is right here https://uiwjs.github.io/react-md-editor/

image

@BadmWe
Copy link
Author

BadmWe commented Jan 1, 2024

hite

@BadmWe
Copy link
Author

BadmWe commented Jan 4, 2024

I fixed this problem using this
highlightEnable={false}

@OgDev-01
Copy link

OgDev-01 commented Feb 2, 2024

Does the highlightEnabled={false} props fix the issue with the cursor position? cc: @BadmWe

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