We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
imageUploadFunction
It would be great to see some code on how the imageUploadFunction method is supposed to be used! The docs are very slim on that!
Art
The text was updated successfully, but these errors were encountered:
In case anyone is finding this through Google, here's an example:
new EasyMDE({ imageUploadFunction: (file, onSuccess, onError) => { const reader = new FileReader(); reader.onload = () => onSuccess(reader.result); reader.onerror = () => onError(`Error loading ${file.name}`); reader.readAsDataURL(file); } })
I wouldn't recommend storing the images as data URIs in your markdown document, this is just a simple example. The file variable is a File object: https://developer.mozilla.org/en-US/docs/Web/API/File.
file
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
It would be great to see some code on how the
imageUploadFunction
method is supposed to be used! The docs are very slim on that!Art
The text was updated successfully, but these errors were encountered: