Open StasSpawn opened 2 years ago
@StasSpawn Not sure if you need an example like this https://codesandbox.io/s/markdown-editor-for-react-uiwjs-react-md-editor-issues-395-jxcwzq?file=/index.js
import MDEditor from "@uiw/react-md-editor";
+ import { commands } from "@uiw/react-md-editor";
+ const commandsObj = [
+ commands.codeEdit,
+ commands.codePreview,
+ commands.divider,
+ commands.fullscreen
+ ];
<MDEditor
+ extraCommands={commandsObj}
+ preview="edit"
height={200}
value={value}
onChange={setValue}
/>
@jaywcjlove I need something like this.
1) Now i can create comments 2) But i also want to edit them.
@jaywcjlove Thank you so much for answer! I will check your work!
For now i manage to do it myself. But I'm using only 1 MDEditor inside modal window for creating and aditing comments.
@jaywcjlove Hello.
I've return to your examples and realize - they don't have creation functionality. Here we have already created comments and can edit them. But I need to 1) create multiple comments 2) and then change each of them.
So, we dont have an initial items with comments, they has to be created and first.
Can i use this component for: 1) Create elements/comments on page (I need multiple elements, like comment section) 2) Edit them after they was created (button edit - click - and elements inside this comment return to MarkDown, where user can make some changes)