Welcome Guest, Not a member yet? Register   Sign In
lightbox/fancybox automatically added to images
#1

[eluser]threestate[/eluser]
I'm using grocery crud (with tinymce) to create page content, and upload images.
Is there a way to wrap any images that come out of the query with anchor tags and references to fancybox/lightbox.
basically, i want EVERY image that gets added through tinymce to be lightboxed

thoughts?
#2

[eluser]LynxCoder[/eluser]
[quote author="threestate" date="1334248018"]I'm using grocery crud (with tinymce) to create page content, and upload images.
Is there a way to wrap any images that come out of the query with anchor tags and references to fancybox/lightbox.
basically, i want EVERY image that gets added through tinymce to be lightboxed

thoughts?[/quote]

When the content of the tinymce form element is submitted, can you not do string manipulation, to update the IMG tag with the necessary additions?

Either using string search and str_replace features, or alternatively explode the text into an array based on the <img> tag, from where you can then work out the image filename and reconstruct the text, or replace the text in the original string?

Rich




Theme © iAndrew 2016 - Forum software by © MyBB