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

自适应高度时,切到preview模式,高度没了 #631

Open
Somnus007 opened this issue Apr 12, 2024 · 6 comments
Open

自适应高度时,切到preview模式,高度没了 #631

Somnus007 opened this issue Apr 12, 2024 · 6 comments

Comments

@Somnus007
Copy link

No description provided.

@jaywcjlove
Copy link
Member

@Somnus007 如果你提供可重现错误的示例,我可以免费帮你看一下

@Somnus007
Copy link
Author

Somnus007 commented Apr 12, 2024

你的demo页面就有这个问题,请看: https://uiwjs.github.io/react-md-editor/#editor-height-adapts-to-text

截屏2024-04-12 20 48 49

@Somnus007
Copy link
Author

MDEditor 加了 height="100%"属性,编辑器的高度就没了。
我主要是想根据文字多少实现编辑器的高度自适应,按照你上面那个链接里做的,结果没成功...

@Somnus007
Copy link
Author

Somnus007 commented Apr 12, 2024

谢谢 🙏

我好像看到问题在哪里了,从nohighlight引入的MDEditer有我说的那个问题:
import MDEditor, { commands } from "@uiw/react-md-editor/nohighlight";

但是,从 @uiw/react-md-editor 引入的 MDEditor,仍然会在 preview="preview" 时出现丢失高度的问题,就像我上面截图的那样 #631 (comment)

截屏2024-04-12 22 34 30

@jaywcjlove
Copy link
Member

@Somnus007 排查一下 节点的高度

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