Hi guys, is there a wat to change @uiw/react-markdown-preview with a custom one?
jaywcjlove opened this issue · 1 comments
jaywcjlove commented
Hi guys, is there a wat to change @uiw/react-markdown-preview with a custom one? I need to replace the preview component, but I haven't been able to make it work yet. What do you guys suggest?
Originally posted by @EnzoVezzaro in #108 (comment)
jaywcjlove commented
Upgrade v3.17.2
import React from "react";
import MDEditor from '@uiw/react-md-editor';
export default function App() {
const [value, setValue] = React.useState("**Hello world!!!**");
return (
<div className="container">
<MDEditor
value={value}
onChange={setValue}
components={{
+ preview: (source, state, dispath) => {
+ return <div>......</div>
+ }
}}
/>
</div>
);
}