Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
dalewking opened this issue Sep 26, 2022 · 0 comments
Open

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

dalewking opened this issue Sep 26, 2022 · 0 comments

Comments

@dalewking
Copy link

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=""/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant