Describe the bug
Summary
Readium currently lets apps add custom text selection actions with EditingAction(title:action:).
However, custom actions are backed by UIMenuItem(title:action:), which does not provide an image API. This means custom actions cannot show icons in the expanded iOS edit menu, while system actions or actions built with modern UIMenuElement / UICommand can show icons.
Current behavior
Custom EditingAction items appear without icons in the expanded system edit menu.
Expected behavior
Readium should provide a way for apps to optionally attach an icon to custom editing actions, so UIKit can display that icon in the expanded edit menu when appropriate.
How to reproduce?
- In the TestApp or an integrating app, add a custom EPUB editing action using EditingAction(title:action:).
- Select text in an EPUB.
- Open the expanded iOS edit menu.
- The custom action appears without an icon.
Readium version
3.8.0
OS version
iOS 26.4
Testing device
iPhone 16
Environment
Additional context
Use case
Apps may want to provide custom EPUB text selection actions such as Highlight, Add note, Translate, or Share, and have them appear visually consistent with native iOS edit menu actions.
For example, an app might want to express:
EditingAction(
title: "Highlight",
image: UIImage(systemName: "highlighter"),
action: #selector(highlightSelection)
)
Describe the bug
Summary
Readium currently lets apps add custom text selection actions with
EditingAction(title:action:).However, custom actions are backed by
UIMenuItem(title:action:), which does not provide an image API. This means custom actions cannot show icons in the expanded iOS edit menu, while system actions or actions built with modernUIMenuElement/UICommandcan show icons.Current behavior
Custom EditingAction items appear without icons in the expanded system edit menu.
Expected behavior
Readium should provide a way for apps to optionally attach an icon to custom editing actions, so UIKit can display that icon in the expanded edit menu when appropriate.
How to reproduce?
Readium version
3.8.0
OS version
iOS 26.4
Testing device
iPhone 16
Environment
Additional context
Use case
Apps may want to provide custom EPUB text selection actions such as Highlight, Add note, Translate, or Share, and have them appear visually consistent with native iOS edit menu actions.
For example, an app might want to express: