跳过内容

开始使用

安装

安装
终端窗口
bun add @capgo/capacitor-textinteraction
bunx cap sync

导入

导入
import { TextInteraction } from '@capgo/capacitor-textinteraction';

Toggle text interaction (selection) on the Capacitor WebView.

仅限iOS

复制到剪贴板

import { TextInteraction } from '@capgo/capacitor-textinteraction';
await TextInteraction.toggle({} as TextInteractionOptions);

类型参考

类型参考

TextInteractionOptions

文本交互选项
export interface TextInteractionOptions {
/**
* Whether text interaction should be enabled or disabled. Disabling hides the
* magnifier lens reintroduced with iOS 15.
*/
enabled: boolean;
}

TextInteractionResult

文本交互结果
export interface TextInteractionResult {
/**
* `true` when the platform supports toggling text interaction (iOS >= 14.5), otherwise `false`.
*/
success: boolean;
/**
* Get the native Capacitor plugin version
*
* @returns {Promise<{ id: string }>} an Promise with version for this device
* @throws An error if the something went wrong
*/
getPluginVersion(): Promise<{ version: string }>;
}

真实来源

真实来源

本页面由插件生成 src/definitions.ts当公共API上游更改时,请重新同步。