react-simplemde-editor icon indicating copy to clipboard operation
react-simplemde-editor copied to clipboard

undefined preview

Open bencinterlink opened this issue 2 years ago • 4 comments

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.

image image

bencinterlink avatar Apr 26 '22 11:04 bencinterlink

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.

bencinterlink avatar Apr 26 '22 14:04 bencinterlink

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.

RIP21 avatar Apr 26 '22 15:04 RIP21

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

dexkode4 avatar Jun 19 '22 15:06 dexkode4

Same problem 😬

jcwrightson avatar Jul 08 '22 10:07 jcwrightson

The issue still persists

KristerL avatar Sep 21 '22 09:09 KristerL

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 :)

RIP21 avatar Oct 01 '22 22:10 RIP21

using [email protected] & [email protected] or @5.2.0, the problem persists @RIP21

solved by downgrading easymde to 2.16.0

Icarus-Xu avatar Oct 31 '22 15:10 Icarus-Xu