📝 Docs: update typora 1.6.0-dev support

This commit is contained in:
萌萌哒赫萝
2023-04-17 22:21:33 +08:00
parent 72c9374a26
commit 34997f58aa
4 changed files with 31 additions and 6 deletions

View File

@@ -30,15 +30,16 @@ export default async (style: IPasteStyle, item: ImgInfo, customLink: string | un
if (useShortUrl) {
url = await generateShortUrl(url)
}
const copyedItem = JSON.parse(JSON.stringify(item))
copyedItem.url = url
const _customLink = customLink || '![$fileName]($url)'
const tpl = {
markdown: `![](${url})`,
HTML: `<img src="${url}"/>`,
URL: url,
UBB: `[IMG]${url}[/IMG]`,
Custom: formatCustomLink(_customLink, copyedItem)
Custom: formatCustomLink(_customLink, {
...item,
url
})
}
return tpl[style]
}