Skip to content

Add Image Hover Lightbox script - #2879

Open
ottopan wants to merge 3 commits into
zsviczian:masterfrom
ottopan:contrib/image-hover-lightbox
Open

Add Image Hover Lightbox script#2879
ottopan wants to merge 3 commits into
zsviczian:masterfrom
ottopan:contrib/image-hover-lightbox

Conversation

@ottopan

@ottopan ottopan commented Aug 10, 2026

Copy link
Copy Markdown

This PR adds the Image Hover Lightbox Excalidraw script and its matching SVG icon to the official script library.

The submitted ea-scripts/Image Hover Lightbox.md is a self-contained build generated from the maintained source project:
https://github.com/otto-OBplugins/excalidraw-image-hover-lightbox

It:

  • shows a fullscreen-corner button when hovering a non-small image;
  • opens the image in a single lightbox preview with zoom, pan, click-outside, and Escape close behavior;
  • keeps a stable Excalidraw Automate API per view and cleans up the view on unload;
  • uses the view-owned document/window for buttons, listeners, and preview DOM.

The PR includes two feature screenshots: scripts-image-hover-lightbox-hover.png shows the hover entry button, and scripts-image-hover-lightbox.png shows the opened lightbox preview.

The official entry does not use runtime fetch, eval, new Function, dynamic imports, or remote module execution. Installation downloads the script and matching SVG only; it does not configure Excalidraw Startup Script automatically. Users can select the installed script under Settings -> Excalidraw -> Startup Script for automatic mounting.

Validation:

  • 54 Node.js tests pass in the source project;
  • the official build is reproducible and statically embeds the source modules;
  • the entry script contains no runtime remote-module loading patterns;
  • the directory metadata parses as JSON and the preview images contain no private vault data.

Popout document isolation is implemented through the view adapter, but still needs Vault-level verification across the main window and Popout views.

@zsviczian

Copy link
Copy Markdown
Owner

check out 2.27.0-beta.2, it adds two key functions that you will want to use in your script:

  • scripts can register for autostart
  • you can register custom shape buttons (similar to how the buttons for Embeddables menu, and the new MarkdownImages work).
  • Read release notes for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants