Skip to content

Conversation

@qwertygc
Copy link

Remove absolute URL when we upload picture

Remove absolute URL when we upload picture
@Ionaru
Copy link
Owner

Ionaru commented Sep 13, 2019

I think this would be better as a configuration option

@qwertygc
Copy link
Author

qwertygc commented Dec 8, 2019

@Ionaru : OK, but how implante this ?

@A-312
Copy link

A-312 commented Jan 26, 2020

@qwertygc easyMDE.options.absoluteURL

@qwertygc
Copy link
Author

OK think,but concretely, how to use this function ?

@A-312
Copy link

A-312 commented Jan 26, 2020

@qwertygc

if (easyMDE.options.imageUploadAbsoluteURL) {
  onSuccess(window.location.origin + '/' + response.data.filePath);
} else {
  onSuccess(response.data.filePath);
}

https://github.com/Ionaru/easy-markdown-editor#options-example

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

Successfully merging this pull request may close these issues.

3 participants