feat: add an abillity to disable writing tools on iOS - #111
Merged
IvanIhnatsiuk merged 1 commit intoJun 27, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new cross-platform prop, writingToolsBehavior, to the public Enriched text input components and wires it through to native so iOS 18+ can control UIKit Writing Tools behavior (with an explicit no-op on Android).
Changes:
- Added
writingToolsBehavior?: 'automatic' | 'complete' | 'disabled' | 'limited'toEnrichedTextInputPropsand propagated it throughEnrichedTextInputandEnrichedReanimatedTextInput(defaulting to'automatic'). - Updated the native component prop surface to accept
writingToolsBehaviorand implemented iOS 18+ handling by mapping string values toUIWritingToolsBehavior. - Added an Android view manager prop setter as a no-op to avoid unknown-prop warnings while keeping parity across platforms.
Reviewed changes
Copilot reviewed 9 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/types.ts | Adds writingToolsBehavior to the public JS/TS props type. |
| src/EnrichedTextInputNativeComponent.ts | Extends native props surface with writingToolsBehavior. |
| src/EnrichedTextInput.tsx | Defaults and forwards writingToolsBehavior to the native component. |
| src/EnrichedReanimatedTextInput.tsx | Defaults and forwards writingToolsBehavior to the native component. |
| ios/extensions/NSString+WritingToolsBehavior.h | Declares iOS 18+ string→UIWritingToolsBehavior conversion helper. |
| ios/extensions/NSString+WritingToolsBehavior.mm | Implements mapping for disabled/complete/limited with default fallback. |
| ios/EnrichedTextInputView.mm | Applies writingToolsBehavior to the underlying text view on iOS 18+. |
| android/src/main/java/com/swmansion/enriched/EnrichedTextInputViewManager.kt | Adds a no-op writingToolsBehavior prop setter for Android. |
| lib/typescript/src/types.d.ts | Generated typings updated to include the new prop. |
| lib/typescript/src/types.d.ts.map | Generated sourcemap updated for typings. |
| lib/typescript/src/EnrichedTextInputNativeComponent.d.ts | Generated native component typings updated. |
| lib/typescript/src/EnrichedTextInputNativeComponent.d.ts.map | Generated sourcemap updated for native component typings. |
| lib/typescript/src/EnrichedTextInput.d.ts | Generated component typings updated to include the new prop in the signature. |
| lib/typescript/src/EnrichedTextInput.d.ts.map | Generated sourcemap updated for EnrichedTextInput typings. |
| lib/typescript/src/EnrichedReanimatedTextInput.d.ts | Generated component typings updated to include the new prop in the signature. |
| lib/typescript/src/EnrichedReanimatedTextInput.d.ts.map | Generated sourcemap updated for EnrichedReanimatedTextInput typings. |
| lib/module/EnrichedTextInputNativeComponent.ts | Built JS module native props surface updated. |
| lib/module/EnrichedTextInput.js | Built JS module forwards the new prop. |
| lib/module/EnrichedTextInput.js.map | Built sourcemap updated accordingly. |
| lib/module/EnrichedReanimatedTextInput.js | Built JS module forwards the new prop. |
| lib/module/EnrichedReanimatedTextInput.js.map | Built sourcemap updated accordingly. |
Files not reviewed (2)
- lib/module/EnrichedReanimatedTextInput.js: Generated file
- lib/module/EnrichedTextInput.js: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request adds support for the
writingToolsBehaviorprop to theEnrichedTextInputandEnrichedReanimatedTextInputcomponents, enabling control over iOS 18's writing tools behavior. The implementation ensures the prop is available in TypeScript types, passed through JS/TS and native layers, and handled appropriately on each platform (with a no-op on Android and full support on iOS 18+).iOS writing tools behavior support:
writingToolsBehaviorprop toEnrichedTextInputandEnrichedReanimatedTextInput, allowing values'automatic' | 'complete' | 'disabled' | 'limited', and updated TypeScript types accordingly.No breaking changes are introduced; the prop defaults to
'automatic'and is ignored on unsupported platforms.Test Plan
Provide clear steps so another contributor can reproduce the behavior or verify the feature works.
For example:
Screenshots / Videos
Include any visual proof that helps reviewers understand the change — UI updates, bug reproduction or the result of the fix.
Compatibility