Skip to content

Commit a9fe660

Browse files
authored
Enable dropping image/* data into markdown to insert images (microsoft#184112)
Enable dropping image/* data into editor This enable drop to create images on web
1 parent 0e0b629 commit a9fe660

File tree

1 file changed

+3
-2
lines changed
  • extensions/markdown-language-features/src/languageFeatures/copyFiles

1 file changed

+3
-2
lines changed

extensions/markdown-language-features/src/languageFeatures/copyFiles/dropIntoEditor.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import * as vscode from 'vscode';
7-
import { createEditForMediaFiles as createEditForMediaFiles, tryGetUriListSnippet } from './shared';
7+
import { createEditForMediaFiles as createEditForMediaFiles, mediaMimes, tryGetUriListSnippet } from './shared';
88
import { Schemes } from '../../util/schemes';
99

1010

@@ -67,7 +67,8 @@ class MarkdownImageDropProvider implements vscode.DocumentDropEditProvider {
6767
export function registerDropIntoEditorSupport(selector: vscode.DocumentSelector) {
6868
return vscode.languages.registerDocumentDropEditProvider(selector, new MarkdownImageDropProvider(), {
6969
dropMimeTypes: [
70-
'text/uri-list'
70+
'text/uri-list',
71+
...mediaMimes,
7172
]
7273
});
7374
}

0 commit comments

Comments
 (0)