Path: blob/main/extensions/markdown-language-features/src/commands/copyImage.ts
3294 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import * as vscode from 'vscode';6import { Command } from '../commandManager';7import { MarkdownPreviewManager } from '../preview/previewManager';89export class CopyImageCommand implements Command {10public readonly id = '_markdown.copyImage';1112public constructor(13private readonly _webviewManager: MarkdownPreviewManager,14) { }1516public execute(args: { id: string; resource: string }) {17const source = vscode.Uri.parse(args.resource);18this._webviewManager.findPreview(source)?.copyImage(args.id);19}20}212223