Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ var editor = EditorJS({
* @param {File} file - file selected from the device or pasted by drag-n-drop
* @return {Promise.<{success, file: {url}}>}
*/
uploadByFile(file){
uploadByFile(file) {
// your own uploading logic here
return MyAjax.upload(file).then(() => {
return {
Expand All @@ -275,17 +275,17 @@ var editor = EditorJS({
* @param {string} url - pasted image URL
* @return {Promise.<{success, file: {url}}>}
*/
uploadByUrl(url){
uploadByUrl(url) {
// your ajax request for uploading
return MyAjax.upload(file).then(() => {
return MyAjax.upload(url).then(() => {
return {
success: 1,
file: {
url: 'https://codex.so/upload/redactor_images/o_e48549d1855c7fc1807308dd14990126.jpg',,
url: 'https://codex.so/upload/redactor_images/o_e48549d1855c7fc1807308dd14990126.jpg',
// any other image data you want to store, such as width, height, color, extension, etc
}
}
})
};
});
}
}
}
Expand Down