Skip to content

​[Feature Request] Add mobile pinch-to-zoom support #63

Description

@cnlnr

💡 Feature Description

Please add support for mobile pinch-to-zoom gestures (touch scaling) in prism-code-editor.

Currently, the editor lacks support for native two-finger pinching/zooming on mobile screens, making it impossible to scale or zoom in on code snippets when needed.


🎯 Use Case / Motivation

When accessing the editor on mobile devices (or within a desktop-simulated viewport like <meta name="viewport" content="width=1280">):

  1. Code text can be too small to read on smaller screens.
  2. Users cannot use the standard mobile two-finger pinch gesture to zoom in on code or zoom out for a broader view.

Adding this feature will significantly improve readability and accessibility for mobile users and WebView environments.


🛠️ Requested Behavior

  • Allow users to scale/zoom the editor content using native mobile pinch-to-zoom gestures.
  • Ensure touch events don't block mobile browser gesture scaling.

📷 Environment

  • Platform: Mobile Browsers (iOS Safari / Android Chrome / Android WebView)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions