Skip to content

Commit c8e0f71

Browse files
committed
Merge branch 'master' of github.com:andrerpena/react-mde
2 parents 68d7788 + 2ac468f commit c8e0f71

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

demo/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class App extends React.Component<{}, AppState> {
6060
};
6161

6262
render() {
63-
const save: SaveImageHandler = async function*(data: ArrayBuffer) {
63+
const save: SaveImageHandler = async function*(data: ArrayBuffer, file: Blob) {
6464
// Promise that waits for "time" milliseconds
6565
const wait = function(time: number) {
6666
return new Promise((a, r) => {

src/commands/command.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,6 @@ export interface PasteOptions {
5959
}
6060

6161
export type SaveImageHandler = (
62-
data: ArrayBuffer
62+
data: ArrayBuffer,
63+
file: Blob
6364
) => AsyncGenerator<string, boolean>;

src/commands/default-commands/save-image-command.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const saveImageCommand: Command = {
6161

6262
const blob = items[index];
6363
const blobContents = await readFileAsync(blob);
64-
const savingImage = saveImage(blobContents);
64+
const savingImage = saveImage(blobContents, blob);
6565
const imageUrl = (await savingImage.next()).value;
6666

6767
const newState = textApi.getState();

0 commit comments

Comments
 (0)