diff --git a/README.md b/README.md index 39e29a2..25c0b82 100644 --- a/README.md +++ b/README.md @@ -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 { @@ -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 } - } - }) + }; + }); } } }