Reocin / obsidian-markdown-formatting-assistant-plugin

This Plugin provides a simple WYSIWYG Editor for Markdown and in addition a command line interface. The command line interface facilitate a faster workflow.
251 stars 28 forks source link

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

Open dalewking opened 2 years ago

dalewking commented 2 years ago

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=""/>