Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow uploading image #167

Open
ducdoan510 opened this issue Feb 6, 2022 · 5 comments
Open

Allow uploading image #167

ducdoan510 opened this issue Feb 6, 2022 · 5 comments

Comments

@ducdoan510
Copy link

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).

@agustints
Copy link

+1

1 similar comment
@wenjianzhang
Copy link

+1

@jaywcjlove
Copy link
Member

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) => {
  }}
/>

@jp-programmer1
Copy link

+1

1 similar comment
@EmirMaestu
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants