mirror of
https://github.com/Kuingsmile/PicList.git
synced 2025-02-09 13:58:12 -05:00
📝 Docs: update typora 1.6.0-dev support
This commit is contained in:
parent
72c9374a26
commit
34997f58aa
11
README.md
11
README.md
@ -42,6 +42,17 @@ PicList的内核使用的是原版PicGo-Core基础上修改的[PicList-core](htt
|
|||||||
|
|
||||||
### 如何在Typora中使用
|
### 如何在Typora中使用
|
||||||
|
|
||||||
|
#### **1.6.0版本及以上**
|
||||||
|
|
||||||
|
**Typora 1.6.0-dev以及以上版本现在已经原生支持PicList了**
|
||||||
|
|
||||||
|
下载地址:
|
||||||
|
|
||||||
|
[Windows 版本](https://download.typora.io/windows/typora-setup-x64-1.6.0-dev.exe "windows")
|
||||||
|
[Mac OS版本](https://download.typora.io/mac/Typora-1.6.0-dev.dmg "macOS")
|
||||||
|
|
||||||
|
#### 1.6.0版本以下
|
||||||
|
|
||||||
Windows:
|
Windows:
|
||||||
|
|
||||||
进入Typora设置界面,选择图像,将上传服务设置为 `PicGo(app)`,然后在 `PicGo路径`中填写PicList的安装路径,如下图所示:
|
进入Typora设置界面,选择图像,将上传服务设置为 `PicGo(app)`,然后在 `PicGo路径`中填写PicList的安装路径,如下图所示:
|
||||||
|
12
README_en.md
12
README_en.md
@ -42,6 +42,18 @@ if you want to use PicList-core, please go to [https://github.com/Kuingsmile/Pic
|
|||||||
|
|
||||||
### How to use in Typora
|
### How to use in Typora
|
||||||
|
|
||||||
|
#### **Version 1.6.0-dev and above**
|
||||||
|
|
||||||
|
**Typora 1.6.0-dev and above versions now support PicList natively**
|
||||||
|
|
||||||
|
download link:
|
||||||
|
|
||||||
|
[Windows Version](https://download.typora.io/windows/typora-setup-x64-1.6.0-dev.exe)
|
||||||
|
|
||||||
|
[Mac OS Version](https://download.typora.io/mac/Typora-1.6.0-dev.dmg)
|
||||||
|
|
||||||
|
#### **Version < 1.6.0-dev**
|
||||||
|
|
||||||
Windows:
|
Windows:
|
||||||
|
|
||||||
Enter the Typora settings page, select the image, set the upload service to `PicGo(app)`, and then fill in the installation path of PicList in `PicGo path`, as shown below:
|
Enter the Typora settings page, select the image, set the upload service to `PicGo(app)`, and then fill in the installation path of PicList in `PicGo path`, as shown below:
|
||||||
|
@ -30,15 +30,16 @@ export default async (style: IPasteStyle, item: ImgInfo, customLink: string | un
|
|||||||
if (useShortUrl) {
|
if (useShortUrl) {
|
||||||
url = await generateShortUrl(url)
|
url = await generateShortUrl(url)
|
||||||
}
|
}
|
||||||
const copyedItem = JSON.parse(JSON.stringify(item))
|
|
||||||
copyedItem.url = url
|
|
||||||
const _customLink = customLink || '![$fileName]($url)'
|
const _customLink = customLink || '![$fileName]($url)'
|
||||||
const tpl = {
|
const tpl = {
|
||||||
markdown: `![](${url})`,
|
markdown: `![](${url})`,
|
||||||
HTML: `<img src="${url}"/>`,
|
HTML: `<img src="${url}"/>`,
|
||||||
URL: url,
|
URL: url,
|
||||||
UBB: `[IMG]${url}[/IMG]`,
|
UBB: `[IMG]${url}[/IMG]`,
|
||||||
Custom: formatCustomLink(_customLink, copyedItem)
|
Custom: formatCustomLink(_customLink, {
|
||||||
|
...item,
|
||||||
|
url
|
||||||
|
})
|
||||||
}
|
}
|
||||||
return tpl[style]
|
return tpl[style]
|
||||||
}
|
}
|
||||||
|
@ -130,8 +130,6 @@ async function pasteTemplate (style: IPasteStyle, item: ImgInfo, customLink: str
|
|||||||
if (useShortUrl) {
|
if (useShortUrl) {
|
||||||
url = await ipcRenderer.invoke('getShortUrl', url)
|
url = await ipcRenderer.invoke('getShortUrl', url)
|
||||||
}
|
}
|
||||||
const copyedItem = JSON.parse(JSON.stringify(item))
|
|
||||||
copyedItem.url = url
|
|
||||||
notification.body = url
|
notification.body = url
|
||||||
const _customLink = customLink || '![$fileName]($url)'
|
const _customLink = customLink || '![$fileName]($url)'
|
||||||
const tpl = {
|
const tpl = {
|
||||||
@ -139,7 +137,10 @@ async function pasteTemplate (style: IPasteStyle, item: ImgInfo, customLink: str
|
|||||||
HTML: `<img src="${url}"/>`,
|
HTML: `<img src="${url}"/>`,
|
||||||
URL: url,
|
URL: url,
|
||||||
UBB: `[IMG]${url}[/IMG]`,
|
UBB: `[IMG]${url}[/IMG]`,
|
||||||
Custom: formatCustomLink(_customLink, copyedItem)
|
Custom: formatCustomLink(_customLink, {
|
||||||
|
...item,
|
||||||
|
url
|
||||||
|
})
|
||||||
}
|
}
|
||||||
return tpl[style]
|
return tpl[style]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user