I would like to disable lightbox effect for images in pages (that is, avoid the popup window that display the image in full size when you click on the image on the page).
Is there a way to do this via javascript or in a configuration file?
Thank you,
This is what I did - add this to the "At end of the BODY" section of your "Custom HTML" admin page:
<script>
// Removes Lightbox
$(".confluence-embedded-image").removeClass("confluence-embedded-image");
</script>
This will remove the class from the confluence image that is required for the lightbox to work.
If you figure it out, let me know. In the mean time, you can "trick" users into not realizing that it's clickable by adding something like the following to your custom stylesheet:
.confluence-embedded-image { cursor: default !important; }
Basically, it prevents the cursor from turning into a "hand" when a user hovers over an image. That way, they don't know it's clickable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you Matt, that helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This will unbind the click from the image:
<script type="text/javascript"> AJS.toInit(function() { // unbind directly-embedded images AJS.$("img.confluence-embedded-image").unbind("click.fb"); }); </script>
Add this to Custom HTML (body section).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.