Skip to content

Zoom image plugin: only content / ignore linked #520

Closed
@jhildenbiddle

Description

@jhildenbiddle

The zoom image plugin currently targets all images except for emoji and those with data-no-zoom attribute.

https://github.com/QingWei-Li/docsify/blob/6c7ebc989dd1572f744fbe5fc8f5af710b790cce/src/plugins/zoom-image.js#L11

Two additional scenarios should excluded by default:

  1. Images outside of the main content area.
  2. Linked images (Ex: <a href="#"><img src="image.jpg"></a>)

I've added a fix-via-plugin to docsify-themeable, but it requires removing all event listeners via cloning the image node which is less than ideal.

Ideally these scenarios would be handled by default.

Thanks!

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