rxliuli / joplin-utils

Joplin-based community tool
https://joplin-utils.rxliuli.com/
MIT License
236 stars 36 forks source link

[Bug]: 图片无法显示 #48

Closed onewesong closed 2 years ago

onewesong commented 2 years ago

Confirmation

The tool/kit where the error occurred

joplin-vscode-plugin

Describe the bug

joplin内图片可以正常显示 vscode markdown previewOffice Viewer 均无法正常显示 p.s. 已设置 markdown.showPreviewSecuritySelector

Steps to reproduce the behavior

  1. 设置markdown.showPreviewSecuritySelector
  2. 打开markdown预览

log file

{"level":"info","message":"command execute: joplinNote.openNote","pluginVersion":"0.7.10"} {"level":"info","message":"openNote start, id: e498b6d5f20748a8b75aab82d8f7fe0e, title: Go 语言垃圾收集器的实现原理","pluginVersion":"0.7.10"} {"level":"info","message":"openNote write tempFile: /Users/songe/Library/Application Support/Code - Insiders/User/globalStorage/rxliuli.joplin-vscode-plugin/.tempNote/Go 语言垃圾收集器的实现原理.md","pluginVersion":"0.7.10"} {"level":"info","message":"openNote open tempFile","pluginVersion":"0.7.10"} {"level":"info","message":"command execute: joplinNote.showResources","pluginVersion":"0.7.10"} {"level":"warn","message":"showResources.noteId: undefined","pluginVersion":"0.7.10"} {"level":"info","message":"command execute: joplinNote.showResources","pluginVersion":"0.7.10"} {"level":"warn","message":"showResources.noteId: undefined","pluginVersion":"0.7.10"} {"level":"info","message":"command execute: joplinNote.showLogFileDir","pluginVersion":"0.7.10"}

Additional context

image image image
rxliuli commented 2 years ago

The html img tag is not currently supported

onewesong commented 2 years ago
image

测试了下,是这种的还不支持预览吗

onewesong commented 2 years ago

https://github.com/rxliuli/joplin-utils/issues/43 为神马看这个issue好像是支持了

rxliuli commented 2 years ago

使用 markdown 语法的是支持的,但不支持 <img> 标签,另外,如果你使用了非官方的 markdown 渲染插件,可能会出现一些问题,例如 Markdown Preview Enhanced https://joplin-utils.rxliuli.com/zh/joplin-vscode-plugin/guide/faq.html#%E4%B8%8D%E5%85%BC%E5%AE%B9%E6%8F%92%E4%BB%B6-markdown-preview-enhanced

onewesong commented 2 years ago

使用 markdown 语法的是支持的,但不支持 <img> 标签,另外,如果你使用了非官方的 markdown 渲染插件,可能会出现一些问题,例如 Markdown Preview Enhanced https://joplin-utils.rxliuli.com/zh/joplin-vscode-plugin/guide/faq.html#%E4%B8%8D%E5%85%BC%E5%AE%B9%E6%8F%92%E4%BB%B6-markdown-preview-enhanced

可以给个支持的示例吗

rxliuli commented 2 years ago

你可以通过 vscode 的编辑器右键菜单上传一张图片,检查是否可以预览,如果不行,则需要尝试禁用所有插件仅保留这个插件以排除是否是插件冲突的问题

下面是个示例,正常 markdown 图片可以显示,但 img 标签则不行

image

onewesong commented 2 years ago

好的,我再看看

onewesong commented 2 years ago

谢谢解答

rxliuli commented 2 years ago

已实现,但这让插件的 bundle 尺寸增加了 160kb,可能晚点还需要重构或优化

image

rxliuli commented 2 years ago

已发布,请手动安装预览版测试 https://github.com/rxliuli/joplin-utils/releases/tag/joplin-vscode-plugin%400.7.11

onewesong commented 2 years ago

🐂niubility!