Create and edit element using markdown
Can i use this component for:
- Create elements/comments on page (I need multiple elements, like comment section)
- Edit them after they was created (button edit - click - and elements inside this comment return to MarkDown, where user can make some changes)
@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.

- Now i can create comments
- But i also want to edit them.
https://codesandbox.io/s/markdown-editor-for-react-uiwjs-react-md-editor-issues-395-jxcwzq?file=/index.js
@StasSpawn
@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
- create multiple comments
- and then change each of them.
So, we dont have an initial items with comments, they has to be created and first.