Linking to image in the export doesn't work but it does on the server

marksweb March 29, 2012

I'm setting up templates & processes to prepare our documentation on the server for delivery in the exported HTML format.

When viewing the page on the server in Confluence I can click on images & be taken to their source, but in the export there is no link.

How does confluence handle these links if they aren't in the exported HTML? Does it use the data-image-src tag somehow? My export looks like this;

<p><img class="confluence-embedded-image" src="attachments/1179860/1310774.png" data-image-src="attachments/1179860/1310774.png"></p>

If it helps I have a demo available; http://dl.dropbox.com/u/3755926/cssTricks/main.html

1 answer

0 votes
Dennis Kromhout van der Meer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 29, 2012

If I understand your question correctly, the thing that makes images "clickable" is the anchor tag. I recommend to compare the DOM between your display and export template, and add the anchor tags to your export as well, making the images clickable.

marksweb March 29, 2012

Yeah I was about to setup a bit of jQuery to bind things together & create the link that way, but I wasn't sure if you could do something with the editor to get confluence and/or the export process to do this for you to save me the job.

Do you know what I need to search the docs for on editing the export? I've found docs on customising the PDF export, but not HTML. I'm not sure if I have access to that at the moment, but its something I have been wanting to look at. Thanks :)

Dennis Kromhout van der Meer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 29, 2012

Are you exporting via Space Admin or via plugin that uses the "Tools" menu?

marksweb March 29, 2012

From the advanced part with space admin as the tools plugin doesn't work correctly.

I've got my JS setup, but as I say, it would be easier to get as much as possible done by the export process, like adding my custom style sheets, js links etc.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events