Skip to content

New tooltip feature #57

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

Merged
merged 4 commits into from
Mar 29, 2025
Merged

New tooltip feature #57

merged 4 commits into from
Mar 29, 2025

Conversation

timlrx
Copy link
Owner

@timlrx timlrx commented Mar 29, 2025

Tooltip

Add showTooltips and tooltipAttribute option to add an optional inline tooltip to the generated citation entry. The bibliography entry will be inserted at the configured tooltipAttribute (default title) and is formatted based on the CSL style used.

There's an additional complication adding the tooltip - citeproc is stateful and the bibliography entry might not fully reflect how a tooltip should be formatted e.g. for an an entry with the same author, the bibliography plugin might render a dash instead. Hence the tooltip should just create a single entry and get the bibliography text associated to it. This requires saving the existing state, generated the single entry and restoring the state.

Closes #56

Copy link

netlify bot commented Mar 29, 2025

Deploy Preview for rehype-citation ready!

Name Link
🔨 Latest commit ce9ade2
🔍 Latest deploy log https://app.netlify.com/sites/rehype-citation/deploys/67e7e3bdc2e272000816706a
😎 Deploy Preview https://deploy-preview-57--rehype-citation.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 site configuration.

@timlrx timlrx merged commit eceb1c9 into main Mar 29, 2025
6 checks passed
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.

Feature: add csl entry content as title (tooltip)
1 participant