uiwjs / react-md-editor

A simple markdown editor with preview, implemented with React.js and TypeScript.
https://uiwjs.github.io/react-md-editor
MIT License
2.17k stars 157 forks source link

How can I listen for events when editor height change? #374

Closed wangshijun closed 2 years ago

wangshijun commented 2 years ago

Awesome library!

I looked into the doc, there is only 1 event listener: onChange, which is used for editor content change.

In some cases, I want to persist editor height to localstorage, so user can get a consistent UX when edit across page loads.

So I suggest we add support for onHeightChange callback whenever editor height changed

jaywcjlove commented 2 years ago

@wangshijun Upgrade @uiw/react-md-editor@3.12.0

wangshijun commented 2 years ago

@jaywcjlove I tried the latest version, but it seems the height dragbar is broken (I can not change the height anymore), you can reproduce this bug at https://uiwjs.github.io/react-md-editor/

jaywcjlove commented 2 years ago

@wangshijun Upgrade @uiw/react-md-editor@3.12.1

jaywcjlove commented 2 years ago

@wangshijun thx!