uiwjs / react-markdown-editor

A markdown editor with preview, implemented with React.js and TypeScript.
https://uiwjs.github.io/react-markdown-editor
MIT License
327 stars 32 forks source link

when using react18 ,there is a bug in ‘resetsize’ #177

Closed qirong77 closed 2 years ago

qirong77 commented 2 years ago

when i using react18 and using this as a component const Editorx = ({ file }) => { <MarkdownEditor value={file.content} onChange={(editor, data, value) => setContent(value)}> } than it give me a error Uncaught TypeError: Cannot read properties of undefined (reading 'setSize') it really spend me a lot of time to save this problem.and when i useing react under 18 .it works!

jaywcjlove commented 2 years ago

@qirong77 The bug has been fixed. Upgrade v4.0.3

Example: https://codesandbox.io/embed/uiwjs-react-markdown-editor-issues-177-hscjnx?fontsize=14&hidenavigation=1&theme=dark