Skip to content

Commit

Permalink
Updated docs to reflect new image uploader function
Browse files Browse the repository at this point in the history
  • Loading branch information
davidroyer committed Feb 4, 2018
1 parent b793e99 commit 7ee106c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ You can see below that 3 parameters are passed.
},
methods: {
handleImageAdded: function(file, Editor, cursorLocation) {
handleImageAdded: function(file, Editor, cursorLocation, resetUploader) {
// An example of using FormData
// NOTE: Your key could be different such as:
// formData.append('file', file)
Expand All @@ -125,6 +125,7 @@ You can see below that 3 parameters are passed.
.then((result) => {
let url = result.data.url // Get url from response
Editor.insertEmbed(cursorLocation, 'image', url);
resetUploader();
})
.catch((err) => {
console.log(err);
Expand Down
4 changes: 3 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ You can see below that 3 parameters are passed.
},
methods: {
handleImageAdded: function(file, Editor, cursorLocation) {
handleImageAdded: function(file, Editor, cursorLocation, resetUploader) {
// An example of using FormData
// NOTE: Your key could be different such as:
// formData.append('file', file)
Expand All @@ -127,6 +127,8 @@ You can see below that 3 parameters are passed.
.then((result) => {
let url = result.data.url // Get url from response
Editor.insertEmbed(cursorLocation, 'image', url);
resetUploader();
})
.catch((err) => {
console.log(err);
Expand Down

0 comments on commit 7ee106c

Please sign in to comment.