obsidian-markdown-formatting-assistant-plugin icon indicating copy to clipboard operation
obsidian-markdown-formatting-assistant-plugin copied to clipboard

Image template adds </img> which is ignored by obsidian

Open dalewking opened this issue 3 years ago • 0 comments

Describe the bug When using the template to insert an <img> tag it adds a </img> which is ignored by obsidian and is visible in the document

To Reproduce Steps to reproduce the behavior:

  1. Go to a note
  2. Click on <img> button under HTML in the side panel
  3. Fill in the information in the template for the image
  4. When you click away from editing the img tag you will see the image but you also see the text </img> after the image

Expected behavior I expect to see just the image

Screenshots Hitting the <img> button gives you a template like this:

<img src="" alt="" width="" height=""></img>

If I fill in fields of the template e.g.:

<img src="https://thumbs.dreamstime.com/b/beautiful-rain-forest-ang-ka-nature-trail-doi-inthanon-national-park-thailand-36703721.jpg" alt="" width="" height="100"></img>

I see this in the presentation version: Screen Shot 2022-09-26 at 11 31 46 AM

Additional context Since obsidian renders based just on the <img> tag I suggest you change your template to be:

<img src="" alt="" width="" height=""/>

dalewking avatar Sep 26 '22 15:09 dalewking