自适应高度时,切到preview模式,高度没了
@Somnus007 如果你提供可重现错误的示例,我可以免费帮你看一下
你的demo页面就有这个问题,请看: https://uiwjs.github.io/react-md-editor/#editor-height-adapts-to-text
给 MDEditor 加了 height="100%"属性,编辑器的高度就没了。
我主要是想根据文字多少实现编辑器的高度自适应,按照你上面那个链接里做的,结果没成功...
@Somnus007 Example: https://codesandbox.io/embed/markdown-editor-for-react-https-github-com-uiwjs-react-md-editor-issues-480-0ttkoe?fontsize=14&hidenavigation=1&theme=dark
- https://github.com/uiwjs/react-md-editor/issues/480#issuecomment-1434025091
谢谢 🙏
我好像看到问题在哪里了,从nohighlight引入的MDEditer有我说的那个问题:
import MDEditor, { commands } from "@uiw/react-md-editor/nohighlight";
但是,从 @uiw/react-md-editor 引入的 MDEditor,仍然会在 preview="preview" 时出现丢失高度的问题,就像我上面截图的那样 https://github.com/uiwjs/react-md-editor/issues/631#issuecomment-2051700948
@Somnus007 排查一下 父 节点的高度