silverbulletmd / silverbullet

The hackable notebook
https://silverbullet.md
MIT License
2.01k stars 138 forks source link

Attachment description is not shown #862

Open GiantCrocodile opened 1 month ago

GiantCrocodile commented 1 month ago

Hello,

I'm using v0.7.7 and uploaded a screenshot from my Windows 11 clipboard via CTRL + V. This works fine and the image is shown. Sadly I don't see any description of the image after typing it.

Code: grafik

When I click out of the block: grafik

The screenshot afterwards is shown with no issue but the part in the square bracket isn't shown. Sadly I found no information at https://silverbullet.md/Attachments or https://silverbullet.md/Markdown/Basics about the syntax and which of the input fields of this syntactical element means what (I suspect first parameter is the description, second one is the filename).

Let me know if I use it wrong or if this is some issue in silverbullet.md or in the used parser lib.

GiantCrocodile commented 1 month ago

Nevermind, I just checked it again and it's not about the title nor the description/caption; it's just the alt-tag. Right now, neither a title nor a description/caption is supported right?

zefhemel commented 1 month ago

Yeah, the meaning of the ![alt text](bla.jpg) is indeed simply used as alt attribute right now (that shows on hover). However, this we could potentially change into putting this alt text underneath the image the image. I personally wouldn't have a problem with that.

GiantCrocodile commented 1 month ago

Thanks for being open for a change on this @zefhemel. I think both should be possible to be set to different values as it serves different use cases:

If both tags have the same value, it would mean that blind persons get the same text twice (duplicate content).

zefhemel commented 1 month ago

How would you specify these things separately using the image syntax, though?

GiantCrocodile commented 3 weeks ago

Good question and I wasn't certain as well. This looks like a possible way:

https://www.docstomarkdown.pro/add-image-captions-to-images-in-jekyll-blog-posts-with-markdown/

The syntax isn't ideal in my point of view from an esthetical point of view but it works and I suspect it has a technical reason why they did it like that.