The aim is to extract all images from a markdown file in Obsidan.
My try:
- write regex to match: but it’s impossible to include everything
- use
document.querySelector('img')
: but it can’t get all images in Obisidan (it may cause from Obsidian cache mechanism)
My idea:
- get a markdown file content
- convert or render markdown to HTML: all images will be rendered into
img
tag, like<img name ='' src=''>
, in that way all images will be rendered in an unified way, so it’s easy to extract all images
Please help me out! Thx~~~