Handle inline images and attachments via data urls
This commit is contained in:
@@ -38,6 +38,12 @@ export function editorSyscalls(editor: Editor): SysCallMapping {
|
||||
win.focus();
|
||||
}
|
||||
},
|
||||
"editor.downloadFile": (_ctx, filename: string, dataUrl: string) => {
|
||||
const link = document.createElement("a");
|
||||
link.href = dataUrl;
|
||||
link.download = filename;
|
||||
link.click();
|
||||
},
|
||||
"editor.flashNotification": (
|
||||
_ctx,
|
||||
message: string,
|
||||
|
||||
Reference in New Issue
Block a user