Open bebru2k1 opened 2 years ago
@bebru2k1 Example: https://codesandbox.io/embed/objective-antonelli-kkojbl?fontsize=14&hidenavigation=1&theme=dark
It works fine.
import { useState } from "react";
import MDEditor from "@uiw/react-md-editor";
const mkdStr = `
\`\`\`javascript
import React from "react";
import ReactDOM from "react-dom";
import MEDitor from '@uiw/react-md-editor';
\`\`\`
`;
export default function App() {
const [value, setValue] = useState(mkdStr);
return (
<div className="App">
<h3>Auto</h3>
<MDEditor
height={200}
value={value}
onChange={(value = "") => {
setValue(value);
}}
/>
</div>
);
}
i am using nextjs
const MDEditor = dynamic(
() => import("@uiw/react-md-editor").then((mod) => mod.default),
{ ssr: false }
);
but i changed and it works fine
const MDEditor = dynamic(
() => import("@uiw/react-md-editor"),
{ ssr: false }
);
@bebru2k1 I'm also using the same in next.js. But unable to run the same in jest test. Getting the error. Any solution on this?
I don't understand why it doesn't work with typescript