Skip to content

add png link and niolesk png button #19#20

Closed
SeidChr wants to merge 1 commit into
gregzuro:masterfrom
SeidChr:master
Closed

add png link and niolesk png button #19#20
SeidChr wants to merge 1 commit into
gregzuro:masterfrom
SeidChr:master

Conversation

@SeidChr
Copy link
Copy Markdown

@SeidChr SeidChr commented Sep 24, 2023

this is partially a solution for #19
i would be glad if you can fix the color of the link icon. it appears to be black for me, but the button on the side has gray color stroke.
my jsfoo is not strong enough for a dropdown, so im good with the links.

not making the main image a link is an option as well, but i really dont see much use in having the image not clickable

@gregzuro
Copy link
Copy Markdown
Owner

Thanks @SeidChr — the PNG download link + niolesk Edit button are in 1.3.0 (#29, https://github.com/gregzuro/obsidian-kroki/releases/tag/1.3.0).

The visual idea is preserved but the implementation is reworked:

  • Built with Obsidian's DOM helpers (fig.createEl(\"a\", ...)), not innerHTML — keeping the community-page scorecard happy.
  • Styled via .kroki-actions in styles.css rather than inline style= strings.
  • Renders as a small "PNG · Edit" row below the diagram instead of an absolutely-positioned button (works the same on mobile + desktop, doesn't depend on theme button positioning).
  • Uses simple text labels rather than the embedded SVG icon for now — happy to revisit if you want to PR the icon styling on top.

Closing — and thanks for the niolesk integration idea, it's genuinely useful.

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

Successfully merging this pull request may close these issues.

2 participants