react-simplemde-editor
react-simplemde-editor copied to clipboard
undefined preview
Using react 18.0.0
& react-simplemde-editor 5.0.2
and having an odd error where all I'm shown is undefined
in the editor when I toggle to preview mode. Toggling the editor back to edit/normal mode brings back the writing I've put into the editor.
import SimpleMDE from "react-simplemde-editor";
import "easymde/dist/easymde.min.css";
interface NewArticleProps {
updatePageHeader: (header:string) => void
}
export default function NewArticle({updatePageHeader}:NewArticleProps) {
return (
<SimpleMDE />
)
}
As you can see it's essentially a default install, tried placing the component at various levels to watch for any difference but have been unsuccessful. Also there are no errors reported in the browser/react console.
Update: Just discovered installing [email protected]
or earlier (as a peer dependency as instructed by README) doesn't result in this error so possibly either a conflict between recent version of easymde or an issue with easymde itself.
Hey. I'll plan to revisit this codebase to check how it works with react 18 etc in recent future and to update package version to include some recent fixes some people introduced.
Regarding issue, prob issues with easymde. Will double check that too.
Update: Just discovered installing
[email protected]
or earlier (as a peer dependency as instructed by README) doesn't result in this error so possibly either a conflict between recent version of easymde or an issue with easymde itself.
Thanks for tthis
Same problem 😬
The issue still persists
Checked with [email protected]
and I don't see any issues. It's also recommended to update to 5.1.0 not that it will fix something, but it may :)
using [email protected] & [email protected] or @5.2.0, the problem persists @RIP21
solved by downgrading easymde to 2.16.0