The most complete doc is available here: https://capgo.app/docs/plugins/textinteraction/
| Plugin version | Capacitor compatibility | Maintained |
|---|---|---|
| v8.*.* | v8.*.* | ✅ |
| v7.*.* | v7.*.* | On demand |
| v6.*.* | v6.*.* | ❌ |
| v5.*.* | v5.*.* | ❌ |
Note: The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.
You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:
npx skills add https://github.com/cap-go/capacitor-skills --skill capacitor-pluginsThen use the following prompt:
Use the `capacitor-plugins` skill from `cap-go/capacitor-skills` to install the `@capgo/capacitor-textinteraction` plugin in my project.
If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:
npm install @capgo/capacitor-textinteraction
npx cap syncimport { TextInteraction } from '@capgo/capacitor-textinteraction';
// Disable the iOS magnifier lens while the WebView is visible
await TextInteraction.toggle({ enabled: false });
// Remember to re-enable before presenting any text inputs
await TextInteraction.toggle({ enabled: true });toggle(options: TextInteractionOptions) => Promise<TextInteractionResult>Toggle text interaction (selection) on the Capacitor WebView.
iOS only.
| Param | Type |
|---|---|
options |
TextInteractionOptions |
Returns: Promise<TextInteractionResult>
getPluginVersion() => Promise<{ version: string; }>Get the native Capacitor plugin version
Returns: Promise<{ version: string; }>
| Prop | Type | Description |
|---|---|---|
success |
boolean |
true when the platform supports toggling text interaction (iOS >= 14.5), otherwise false. |
| Method | Signature | Description |
|---|---|---|
| getPluginVersion | () => Promise<{ version: string; }> | Get the native Capacitor plugin version |
| Prop | Type | Description |
|---|---|---|
enabled |
boolean |
Whether text interaction should be enabled or disabled. Disabling hides the magnifier lens reintroduced with iOS 15. |
This plugin was inspired by the work of https://github.com/astrocreep/capacitor-plugins/tree/main/packages/textinteraction