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

Markdown editor overflow at small size #173

Closed
serendipity1004 opened this issue May 22, 2021 · 4 comments
Closed

Markdown editor overflow at small size #173

serendipity1004 opened this issue May 22, 2021 · 4 comments

Comments

@serendipity1004
Copy link

Screen Shot 2021-05-22 at 2 34 59 PM

it's a 425x759 size screen in chrome and editor content seems to overflow.

      <MDEditor
        value={MARKDOWN_SAMPLE}
        preview="edit"
        height={400}
        visiableDragbar={false}
        previewOptions={{
          skipHtml: true,
        }}
      />

above is the simple settings I'm using.

@jaywcjlove
Copy link
Member

@serendipity1004
Copy link
Author

@jaywcjlove yea I think you're right. I can't seem to find which style is conflicting tho.

@serendipity1004
Copy link
Author

After a further investigation it actually was nothing to do with style conflict. I was having this issue in the chrome dev tools (I have no idea if it also happens in real mobile devices) and It seems that if you set the MDEditor width to certain value (explicit pixels or simple 100%) the issue gets resolved. If you don't, as you resize the screen using dev tools, the bottom textarea will overflow just as much as how much more space toolbar eats up.

@serendipity1004
Copy link
Author

add width like below

<MDEditor
  style={{
    width: "100%",
  }}
  value={MARKDOWN_SAMPLE}
  height={400}
/>

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

2 participants