react-markdown-editor icon indicating copy to clipboard operation
react-markdown-editor copied to clipboard

Allow uploading image

Open ducdoan510 opened this issue 3 years ago • 6 comments

Hi I am using this great library and may I ask if we can have an image command that allows uploading image from local? Suppose we have a server that can we can upload the image to. The button can then receive a callback that return an image_url to be used in the editor like ![description](image_url).

ducdoan510 avatar Feb 06 '22 23:02 ducdoan510

+1

agustints avatar Feb 13 '22 22:02 agustints

+1

wenjianzhang avatar May 27 '22 06:05 wenjianzhang

I think you can use events to achieve what you want. https://codesandbox.io/s/react-markdown-editor-forked-ltt49r?file=/src/App.js

<MarkdownEditor
  value="# title"
  onDragover={() => {
    console.log(">>>>3onDragover>>>");
  }}
  onDragenter={() => {
    console.log(">>>>3onDragenter>>>");
  }}
  onChange={(editor, data, value) => {
  }}
/>

jaywcjlove avatar May 27 '22 08:05 jaywcjlove

+1

jp-programmer1 avatar Oct 14 '22 18:10 jp-programmer1

+1

EmirMaestu avatar Oct 14 '22 18:10 EmirMaestu