Skip to content

Feature request: detect if a prose image is wrapped in a link #430

@maximepvrt

Description

@maximepvrt

We’re using @nuxtjs/mdc in combination with @nuxt/ui, and we’d like to know if there is a way for a prose image to detect if it is wrapped inside a link.

Use case:
In Nuxt UI, we have a zoom-on-click feature for images. However, when an image is already wrapped in a link, we’d like to automatically disable this zoom behavior to avoid conflicts with the link navigation.

Question / Feature request:

  • Is there currently a way in @nuxtjs/mdc to know, from the image component or rendering context, that it is wrapped in a link?
  • If not, would it be possible to expose such information or provide a prop/context so that we can conditionally disable zoom?

Thank you for your help @farnabaz 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions