Skip to content

Preview not working (showing undefined) #223

Description

@Omer1Yuval1

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",

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions