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

Generate image with link to self (anchor tag with image URL) #258

Open
mikaello opened this issue May 12, 2021 · 2 comments
Open

Generate image with link to self (anchor tag with image URL) #258

mikaello opened this issue May 12, 2021 · 2 comments

Comments

@mikaello
Copy link

I am using this package to generate a SVG image for my Excalidraw diagram:

[excalidraw]
------
include::example$flow-diagram.excalidraw[]
------

This works fine, but the problem is that this flow diagram is quite big, so it would be useful to be able to click the diagram and get the full image (just showing the raw image in another tab would be perfect). I have tried many versions of adding the link attribute, but couldn't get anything to work.

What would be nice was if there was anything like this:

[excalidraw, link=%self%]
------
include::example$flow-diagram.excalidraw[]
------

So the generated image was contained in an anchor tag with the image source link as URL.

I could of course add the generated image URL as a link attribute, but since the generated URL changes every time the Excalidraw diagram is changed this is error prone.

Maybe it already exist a feature like this?

@ggrossetie
Copy link
Member

That's a good idea and it's somehow related to: asciidoctor/asciidoctor#3656
Having said that, I think we can implement this feature ahead of time since we create an Image block.

What would be nice was if there was anything like this:
[excalidraw, link=%self%]

I think we should use the value self instead of %self% but otherwise 👍🏻

@ggrossetie
Copy link
Member

Once Asciidoctor 2.1 will be released, this feature will be available since we pass the link attribute to Asciidoctor core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants