shuzijun / markdown-editor

IntelliJ Platform A full-featured WYSIWYG editor for markdown
https://plugins.jetbrains.com/plugin/17254-markdown-editor
Apache License 2.0
165 stars 35 forks source link

AndroidStudio 图片预览失败 #37

Closed Heart-Beats closed 2 years ago

Heart-Beats commented 2 years ago

image 如上图所示,图片预览失败,环境如下: image 请大佬确认一下是啥原因

shuzijun commented 2 years ago

图片的路径是git的文件的地址,不支持跨域访问,可以试试在地址后加上?raw=true

Heart-Beats commented 2 years ago

路径是 https://github.com/netease-im/NIM_Resources/blob/master/Android/Images/uikit_struct.png,我大概清楚原因是啥了,这个地址对应的是 github 上的页面并不是实际图片地址,大佬可以对这种情况进行兼容处理一下吗? 真实的图片地址为: https://raw.githubusercontent.com/netease-im/NIM_Resources/master/Android/Images/uikit_struct.png

shuzijun commented 2 years ago

是这个图片路径限制了加载,没办法兼容,可以在日志中看到

Cross-Origin Read Blocking (CORB) blocked cross-origin response https://github.com/netease-im/NIM_Resources/blob/master/Android/Images/uikit_struct.png? 
Heart-Beats commented 2 years ago

image 我的意思是把github上的图片实际加载地址转换为上图中的类似格式,不知道能不能实现,我不太清楚您的插件针对 markdown 的解析之前是否可以修改相关数据

shuzijun commented 2 years ago

不会针对链接做这种转换的

Heart-Beats commented 2 years ago

好的,那我就把这个问题给关闭了

BIGMONK commented 2 years ago

是这个图片路径限制了加载,没办法兼容,可以在日志中看到

Cross-Origin Read Blocking (CORB) blocked cross-origin response https://github.com/netease-im/NIM_Resources/blob/master/Android/Images/uikit_struct.png? 

请问日志怎么看的

shuzijun commented 2 years ago

请问日志怎么看的 编辑器上右键 Open Devtools ,打开的是浏览器的开发者工具