Topic: Selectable Text
HI,
I need to be able to send galleries as proofs to clients, from which they need to be able to copy and paste the filename (as caption). Is this doable? Galleries created so far do not have text that can be selected.
You are not logged in. Please login or register.
Juicebox Support Forum → Juicebox-Pro Support → Selectable Text
HI,
I need to be able to send galleries as proofs to clients, from which they need to be able to copy and paste the filename (as caption). Is this doable? Galleries created so far do not have text that can be selected.
Elements within a gallery cannot be selected. This is by design to prevent areas of the gallery being highlighted with a blue overlay by the browser when a user clicks throughout the gallery.
One possible solution to the problem might be to display the current image's title and/or caption in a container outside the gallery using the Juicebox-Pro API (specifically the onImageChange() event and the getImageInfo() method). Here is an example. Just create a sample gallery with JuiceboxBuilder-Pro and use the code below as the gallery's HTML index page.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Juicebox-Pro Gallery</title>
<meta charset="utf-8" />
<meta name="viewport" id="jb-viewport" content="minimal-ui" />
<style type="text/css">
body {
margin: 0px;
}
</style>
</head>
<body>
<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
var jb = new juicebox({
containerId: 'juicebox-container',
galleryWidth: '600',
galleryHeight: '400'
});
jb.onImageChange = function(e) {
var index = e.id;
var info = jb.getImageInfo(index);
var title = info.title;
var caption = info.caption;
document.getElementById('text').innerHTML = title + '<br />' + caption;
};
</script>
<div id="juicebox-container"></div>
<div id="text"></div>
<!--END JUICEBOX EMBED-->
</body>
</html>
The current image's title and caption are displayed in a container below the gallery (as well as within the gallery itself) and can be selected from this container.
Juicebox Support Forum → Juicebox-Pro Support → Selectable Text
Powered by PunBB, supported by Informer Technologies, Inc.