Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview not working (showing undefined) #223

Open
Omer1Yuval1 opened this issue May 27, 2023 · 5 comments
Open

Preview not working (showing undefined) #223

Omer1Yuval1 opened this issue May 27, 2023 · 5 comments

Comments

@Omer1Yuval1
Copy link

When I click the preview button, the raw text is replaced by undefined, instead of the compiled markdown.

import SimpleMdeReact from "react-simplemde-editor";

const component_name = () => {
    const [value, setValue] = useState("");
    const options = useMemo(() => {
        return {
            blockStyles: {
                code: "```"
              },
              toolbar: [
                  "bold",
                  "italic",
                  "heading",
                  "|",
                  "code",
                  "quote",
                  "unordered-list",
                  "ordered-list",
                  "|",
                  "link",
                  "image",
                  "table",
                  "horizontal-rule",
                  "preview",
                  "guide"
                ],
        }
    }, []);

     return (
          <SimpleMdeReact value={value} options={options}/>
     );
}

Versions:

"react": "^18.2.0",
"easymde": "^2.18.0",
"react-simplemde-editor": "^5.2.0",
@ElGranTorino
Copy link

same

@necimye
Copy link

necimye commented Jun 29, 2023

Try easymde 2.16.0 or less

@Dhalion
Copy link

Dhalion commented Jul 13, 2023

Try easymde 2.16.0 or less

Doesn't work for me

@joecrop
Copy link

joecrop commented Aug 9, 2023

This worked for me. I had to set "easymde": "2.16.0" in my package.json instead of "easymde": "^2.16.0". Note the missing carrot symbol to prevent npm from auto-upgrading it.

@asbjornenge
Copy link

I saw this issue with easymed ^2.18.0. Downgrading to 2.16.0 fixes it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants