Skip to content

Adds an images filter #9095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

saqimtiaz
Copy link
Member

@saqimtiaz saqimtiaz commented Jun 15, 2025

  • This PR adds an images filter that returns all images used in a tiddler using an $image widget or the [img[...]] syntax.

  • It introduces a new wiki.extractFromParseTree method that is now used by extractImages, extractLinks and extractTranscludes.

Transclusions of image tiddlers are not picked up by the filter, neither are <img> HTML elements, as is consistent with the links[] operator which only returns links created by the $link widget.

There may however be value in supporting the extraction of <img> HTML elements as well, possibly enabled by a suffix. Any thoughts on this are welcome.

To do:

  • documentation

Copy link

Confirmed: saqimtiaz has already signed the Contributor License Agreement (see contributing.md)

Copy link

netlify bot commented Jun 15, 2025

Deploy Preview for tiddlywiki-previews ready!

Name Link
🔨 Latest commit fe821ca
🔍 Latest deploy log https://app.netlify.com/projects/tiddlywiki-previews/deploys/684eda83945c8a000872593b
😎 Deploy Preview https://deploy-preview-9095--tiddlywiki-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

📊 Build Size Comparison: empty.html

Branch Size
Base (master) 2528.0 KB
PR 2529.4 KB

Diff: ⬆️ Increase: +1.4 KB

@saqimtiaz saqimtiaz moved this to Backlog in Planning for v5.4.0 Jun 17, 2025
@saqimtiaz saqimtiaz moved this from Backlog to In progress in Planning for v5.4.0 Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

1 participant