Feature #14605

Click-enlarge for Images

Added by Robert Markula over 15 years ago. Updated over 12 years ago.

Should have
RTE (rtehtmlarea + ckeditor)
Target version:
Start date:
Due date:
% Done:


Estimated time:
PHP Version:
Sprint Focus:


Adding a "click-enlarge" option for inserted images (perhaps accessible via the 'Image Properties...' context menu of an image).

Like seen in the 'Text with image' element.
(issue imported from #M880)


rtehtmlarea_feature_0880_v5.patch (4.21 KB) rtehtmlarea_feature_0880_v5.patch Administrator Admin, 2008-01-31 22:33

Related issues

Related to TYPO3 Core - Bug #17412: parseFunc tags.XXX for single tags doesn't workClosed2007-06-22


Updated by Martin Kutschker almost 15 years ago

Perhaps possible with a new TYPOIMG tag in the DB (instead of saving the plain HTML img tag).


Updated by Florian Stolz over 14 years ago

i searched for that feature too, would be really useful (for me)


Updated by Martin Kutschker over 14 years ago

Maybe a TYPOIMG tag is not so good as it is not so easy to edit. Perhaps it's possible to use a custom attribute "clickenlarge" or general attribute "typo3" (or ("t3props") for it.


Updated by Stanislas Rolland over 14 years ago

What about a custom tag, say <clickenlarge>, that would wrap the <img> tag. The wrapping/unwrapping could be done with the image properties window.


Updated by Martin Kutschker over 14 years ago

I don't know the internals of htmlarea and I'm not a parsefunc guru.

From a user perspective the feature should be available (as you suggested) from the image properties dialog. The user should not see a any tags in plaintext around the image!

From the admin perspective it should be as transparent as possible. It should not be necessary to fiddle TYPOIMG or CLICKENLARGE into all possoble occurences of "allowedtags" etc.

But I'm surprised that wrapping the img with a custom tag is easier than adding custom attributes.


Updated by Stanislas Rolland over 14 years ago

The feature will be implemented with a custom tag <clickenlarge>. When the feature is enabled, each image tag will be wrapped in a clickenlarge tag. The clickenlarge tag will have two attributes: "src" will hold the reference to the original image file, "value" will be used to enable/disable click-enlarge on the wrapped image. It will thus be possible to set/unset the clickenlarge property of an image. The clickenlarge tag will not be visible in wysiwyg mode, except in the status bar at the bottom of the editing area. An extension configuration variable (checkbox) will allow to enable the feature. The feature will re-use the existing imageLinkWrap TS configuration attached to the tt_content.image object.


Updated by Stanislas Rolland over 14 years ago

Well, the custom tag approach worked fine in Firefox, but got killed in IE6.

Fallback: will use two attributes on the img tag, one to set/unset click-enlarge, the other to keep the location of the original image. But this requires a small patch in tslib_content's parsefunc which does not currently handle solo tags.


Updated by Nickolas Shadrin about 13 years ago

a small patch in tslib_content's parsefunc

Is there any development on the issue?
What patch are you talking about?


Updated by Sven Mittelbach almost 13 years ago

I'm also very interested in a working patch. Is there still any development? I tried to wrap the Image with custom tags, which isn't complicated, but nothing happens. Without the small patch from the related bug, the whole image is removed. how does the clickenlarge thing work? should it add some parameters, does it substitute the tags (e.g. <clickenlarge>|</clickenlarge>)? is there a working patch for T3 4.1.3?


Updated by Stanislas Rolland almost 13 years ago

Once the attached patch is installed on the latest trunk revision, here is how to test it:
1. there will be a new check box in the Extension Manager configuration page of htmlArea RTE: check the box;
2. also with EM, make sure images are enabled in the RTE!
3. on a TS template that applies to the page on which you are going to test, in section "Include static (from extensions):", add static template "Clickenlarge Rendering (rtehtmlarea)";
4. on a RTE-enabled content element, insert an image, then edit the properties of the image; there should be a new check box "Click to enlarge": check it, click update, and save;
5. hopefully, you should be able to click on the image in the frontend.

Let me know if you observe any bad side effect...


Updated by Nickolas Shadrin almost 13 years ago

works perfectly.



Updated by Stanislas Rolland almost 13 years ago

Attaching a better version of the patch.


Updated by Markus almost 13 years ago

does this only affect new images, or also existing ones?
do I only have to patch the two files in my TYPO3 4.1.5 with RTE 1.5.5 or do I need the whole set from the SVN?


Updated by Markus almost 13 years ago

after patching the system described above the FE didn't work any longer and in the BE on mac OSX with FF the RTE was not loading.


Updated by Stanislas Rolland almost 13 years ago

I don't think the patch can have such effects neither on the FE, nor on the RTE. Perhaps the patch was incorrectly applied. The patch is generated against SVN trunk but, if applied with caution, would probably work also with 4.1.5. Regarding the RTE, it simply enables code that was already there.

The patch does not affect existing images. It will add a new attribute on images so as to keep track of their original source. Therefore it will work on images inserted while the feature is active. It adds a checkbox on the image properties popup window. If the checkbox is checked when the properties of an image are edited, the image may be clicked and enlarged in the FE.


Updated by Markus almost 13 years ago

Patching TYPO3 4.1.5 with this patch causes errors in the FE.
The patched file "class.tslib_content.php" doesn't work on 4.1.5.
Due I'm hosting my project at an external provider without own server I can't install the trunk version.


Updated by Stanislas Rolland almost 13 years ago

Would anyone test this patch on the latest revision of trunk, please?


Updated by Stanislas Rolland almost 13 years ago

Committed to SVN TYPO3core trunk revision 3006 (for inclusion in TYPO3 4.2 beta 1).

Also available in: Atom PDF