flutter-quill icon indicating copy to clipboard operation
flutter-quill copied to clipboard

feat(iOS): use system context menu in iOS(for secure paste)

Open kexuejin opened this issue 4 months ago โ€ข 3 comments

Based on the PR template you provided, here's the Pull Request content prepared for your system context menu feature modification:

Description

This PR modifies the Flutter Quill editor's context menu building logic to prioritize QuillSystemContextMenu when config.useSystemContextMenuItems is set to true . This change enables iOS secure paste functionality and improves user experience with native system context menus.

New behavior: When useSystemContextMenuItems is true and the platform supports it, the editor uses QuillSystemContextMenu.quillEditor() to display native system menus; if not supported, it falls back to the original menu building logic.

Motivation: To fully utilize iOS system-provided secure paste functionality and native user experience.

Related Issues

  • Related to iOS secure paste functionality improvements

Type of Change

  • โœจ Feature: New functionality without breaking existing features.
  • ๐Ÿ› ๏ธ Bug fix: Resolves an issue without altering current behavior.
  • ๐Ÿงน Refactor: Code reorganization, no behavior change.
  • โŒ Breaking: Alters existing functionality and requires updates.
  • ๐Ÿงช Tests: New or modified tests
  • ๐Ÿ“ Documentation: Updates or additions to documentation.
  • ๐Ÿ—‘๏ธ Chore: Routine tasks, or maintenance.
  • โœ… Build configuration change: Build/configuration changes.

kexuejin avatar Aug 15 '25 08:08 kexuejin

Since Flutter's SystemContextMenu only supports text in the clipboard, if there is an image in the clipboard, SystemContextMenu will not provide the Paste Menu.

kexuejin avatar Aug 15 '25 08:08 kexuejin

Since Flutter's SystemContextMenu only supports text in the clipboard, if there is an image in the clipboard, SystemContextMenu will not provide the Paste Menu.

We do have quill_native_bridge to address this issue; however, it currently does not support Windows and does not support Linux well (especially in sandboxed environments in case of Flatpak).

EchoEllet avatar Aug 19 '25 09:08 EchoEllet

I wanted to follow up on the status of this PR. We believe this change is critical for enhancing the UX, so we are very keen to see it merged. I am happy to assist with any remaining tasks if needed.

senri1101 avatar Dec 04 '25 04:12 senri1101