An add-on for Plone to make images inserted through the TinyMCE editor clickable and viable in a bigger resolution
Project description
collective.click_to_zoom
An add-on for Plone to make images inserted through the TinyMCE editor clickable and viewable in a bigger resolution
Features
collective.click_to_zoom provides a seamless, click-to-zoom (lightbox) effect for images embedded in Plone RichText fields.
When a user clicks on an inline image within the page content, the image smoothly expands to the center of the screen with a semi-transparent dark background, mimicking the popular "Medium-style" image zoom functionality.
Key features:
- Zero Javascript dependencies: Uses lightweight Vanilla JS to handle the zoom effect without relying on heavy libraries (no jQuery, no NPM dependencies required).
- Non-destructive Output Filter: Uses a backend Python output filter (
ClickToZoomFilter) that safely wraps the<img>tags in an<a>tag pointing to a larger cacheable image scale, ensuring it doesn't break Plone's built-in imagesrcsetfunctionalities. - Configurable: Includes a Plone Control Panel where administrators can:
- Toggle the click-to-zoom effect globally (Enable/Disable).
- Select the specific image scale to be used when zooming (e.g.,
large,great,huge), dynamically populated from Plone's existing image scales vocabulary.
- ZCA compliant: The backend HTML parser is conditionally applied through an
IBrowserLayer, ensuring zero overhead on sites where the add-on is not installed. - Graceful degradation: If an image is already manually wrapped in a hyperlink (e.g., the editor linked the image to a different page), the zoom filter will safely ignore it to preserve the author's intent.
Installation
Install collective.click_to_zoom with pip:
pip install collective.click_to_zoom
And to create the Plone site:
make create-site
Contribute
Prerequisites ✅
- An operating system that runs all the requirements mentioned.
- uv
- Make
- Git
- Docker (optional)
Installation 🔧
-
Clone this repository, then change your working directory.
git clone git@github.com:collective/collective.click_to_zoom.git cd collective.click_to_zoom
-
Install this code base.
make install
Add features using plonecli or bobtemplates.plone
This package provides markers as strings (<!-- extra stuff goes here -->) that are compatible with plonecli and bobtemplates.plone.
These markers act as hooks to add all kinds of subtemplates, including behaviors, control panels, upgrade steps, or other subtemplates from plonecli.
To run plonecli with configuration to target this package, run the following command.
make add <template_name>
For example, you can add a content type to your package with the following command.
make add content_type
You can add a behavior with the following command.
make add behavior
You can check the list of available subtemplates in the [`bobtemplates.plone` `README.md` file](https://github.com/plone/bobtemplates.plone/?tab=readme-ov-file#provided-subtemplates).
See also the documentation of [Mockup and Patternslib](https://6.docs.plone.org/classic-ui/mockup.html) for how to build the UI toolkit for Classic UI.
Built with AI 🤖
This package was developed in collaboration with Google Gemini. The AI assisted in scaffolding the Plone output filters, writing the Vanilla JS lightbox, and configuring the Zope Component Architecture, which was then reviewed and curated by human developers.
License
The project is licensed under GPLv2.
Credits and acknowledgements 🙏
Generated using Cookieplone (1.0.0) and cookieplone-templates (f72da68) on 2026-03-30 09:05:27.109597. A special thanks to all contributors and supporters!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file collective_click_to_zoom-1.1.0.tar.gz.
File metadata
- Download URL: collective_click_to_zoom-1.1.0.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a178976382c1c496048e467db059ce60cb4f03094fe0be6d92a4150ed1bd62a
|
|
| MD5 |
506090eb1b514fb6d86379e1a4785cd1
|
|
| BLAKE2b-256 |
8f19f2ebf12bf8c7fbd5b2f06322e7f21f05b833f2157b9e6665e3f8f5bc1baa
|
File details
Details for the file collective_click_to_zoom-1.1.0-py3-none-any.whl.
File metadata
- Download URL: collective_click_to_zoom-1.1.0-py3-none-any.whl
- Upload date:
- Size: 34.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7867e84bbc3596511cd13b4ce3865f880b38cb11b73d26b1b9248ae1bf39a86
|
|
| MD5 |
0c2b336d907bfc8b523059ff811e8004
|
|
| BLAKE2b-256 |
05eba493529dafbb5eda08f0e49b555cebab0604be619158ad3eb38ca22d36a6
|