@@ -18,7 +18,7 @@ import {
1818 SETTING_MEDIA_SUPPORTED_MIMETYPES
1919} from '../constants' ;
2020import { SortingOption } from '../dashboardWebView/models' ;
21- import { MediaInfo , MediaPaths , SortOrder , SortType } from '../models' ;
21+ import { BlockFieldData , MediaInfo , MediaPaths , SortOrder , SortType } from '../models' ;
2222import { basename , join , parse , dirname , relative } from 'path' ;
2323import { statSync } from 'fs' ;
2424import { Uri , workspace , window , Position } from 'vscode' ;
@@ -376,7 +376,18 @@ export class MediaHelpers {
376376 * Insert an image into the front matter or contents
377377 * @param data
378378 */
379- public static async insertMediaToMarkdown ( data : any ) {
379+ public static async insertMediaToMarkdown ( data : {
380+ file : string ;
381+ relPath : string ;
382+ snippet : string ;
383+ position : Position ;
384+ title ?: string ;
385+ alt ?: string ;
386+ caption ?: string ;
387+ fieldName : string ;
388+ parents : string [ ] ;
389+ blockData : BlockFieldData ;
390+ } ) {
380391 if ( data ?. file && data ?. relPath ) {
381392 await EditorHelper . showFile ( data . file ) ;
382393 Dashboard . resetViewData ( ) ;
@@ -444,7 +455,7 @@ export class MediaHelpers {
444455 const docType = Wysiwyg . getDocType ( filePath ) ;
445456
446457 let snippet = data . snippet || '' ;
447- if ( ! data . Snippet ) {
458+ if ( ! snippet ) {
448459 if ( docType === 'markdown' ) {
449460 snippet = `${ isFile ? '' : '!' } [${ caption } ](${ FrameworkDetector . relAssetPathUpdate (
450461 relPath ,
0 commit comments