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

Text, cursor and selection not aligned #503

Open
ajboni opened this issue Apr 12, 2023 · 5 comments
Open

Text, cursor and selection not aligned #503

ajboni opened this issue Apr 12, 2023 · 5 comments

Comments

@ajboni
Copy link

ajboni commented Apr 12, 2023

I get this behaviour in latest "@uiw/react-md-editor": "^3.20.7", seems similar to other cursor issues

image

Using electron 24 which is chromium based

@jaywcjlove
Copy link
Member

@ajboni Usually, this is caused by a conflict of styles.

You can reproduce your error using https://codesandbox.io and I can help you to have a look.

@ajboni
Copy link
Author

ajboni commented Apr 13, 2023

Thanks, very difficult to reproduce in codesandbox... any hint on what style could be causing such behaviour?

@podotki
Copy link

podotki commented Apr 13, 2023

Hello,
I encounter this problem too. Any idea on how to fix this please ?

Edit:
@ajboni I just found the styles conflict. I had different font-size on my own textarea and the lib textarea font-size. Putting both textarea font-size the same fixed the problem.

Cheers !

@jaywcjlove
Copy link
Member

@sito8943
Copy link

sito8943 commented Sep 28, 2023

I think that is a font family problem

in my global css I added this 👇👇

.w-md-editor-text-pre,
.w-md-editor-text-input,
.w-md-editor-text > .w-md-editor-text-pre {
  font-family: inherit !important;
}

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

4 participants