Skip to content

fix(android): "paste as plain text" context menu action works as expected - #806

Open
hejsztynx wants to merge 3 commits into
mainfrom
@ksienkiewicz/fix-paste-as-plain-text
Open

hejsztynx wants to merge 3 commits into
mainfrom
@ksienkiewicz/fix-paste-as-plain-text

Conversation

@hejsztynx

Copy link
Copy Markdown
Collaborator

Summary

Previously the native paste as plain text action in the context menu did effectively the same thing as the normal paste action - pasted the text including the styles. Wired that context menu action up, so it actually pastes just the plain text.

Test Plan

Write some text, apply a paragraph nad an inline style and copy a part of that text. Next paste it using the context menu with both paste and paste as plain text options.

Compatibility

OS Implemented
iOS ❌
Android ✅
Web ❌

Checklist

  • E2E tests are passing
  • Required E2E tests have been added (if applicable)

Copilot AI lite review requested due to automatic review settings September 22, 2026 21:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Address the clipboard coercion issue and add the requested Android E2E coverage.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Fixes Android’s native “Paste as plain text” action so pasted content loses paragraph and inline formatting.

Changes:

  • Handles the plain-text paste context-menu action.
  • Creates an unstyled clipboard item before insertion.
File Summary
android/​src/​main/​java/​com/​swmansion/​enriched/​textinput/​EnrichedTextInputView.kt Adds plain-text paste handling. Moderate (2 votes): use item.coerceToText(context) when item.text is unavailable. Nit (1 vote): add Android E2E coverage for styled content pasted as plain text.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputView.kt Outdated
hejsztynx and others added 2 commits September 22, 2026 23:36
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@hejsztynx
hejsztynx requested a review from exploIF September 22, 2026 21:48

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants