Panduan Memulai
Copy prompt setup berisi langkah install dan panduan markdown lengkap untuk plugin ini.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-textinteraction`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/textinteraction/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
Anda bisa menggunakan AI-Assisted Setup untuk menginstal plugin ini. Tambahkan skill Capgo ke tool AI Anda menggunakan perintah berikut:
bunx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsLalu gunakan prompt berikut:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-textinteraction` plugin in my project.Jika Anda lebih suka Manual Setup, instal plugin dengan menjalankan perintah berikut dan ikuti instruksi khusus platform di bawah ini:
bun add @capgo/capacitor-textinteractionbunx cap syncimport { TextInteraction } from '@capgo/capacitor-textinteraction';Mulai cepat
Bagian berjudul “Mulai cepat”import { TextInteraction } from '@capgo/capacitor-textinteraction';
const result = await TextInteraction.toggle({ enabled: true });console.log(result);Contoh: isEnabled
Bagian berjudul “Contoh: isEnabled”import { TextInteraction } from '@capgo/capacitor-textinteraction';
const result = await TextInteraction.isEnabled();console.log(result);Masalah umum
Bagian berjudul “Kesalahan umum”- Sinkronisasi native: jalankan
bunx cap syncsetelah upgrade plugin. - Sumber kebenaran: percaya
src/definitions.tspada repo GitHub.
Ikhtisar API
Bagian berjudul “Ikhtisar API”toggle
Bagian berjudul “toggle”Aktifkan interaksi teks (seleksi) pada Capacitor WebView.
⚠️ Menonaktifkan interaksi teks akan membuat semua kontrol input teks tidak berfungsi selama dinonaktifkan. Gunakan sesekali dan aktifkan kembali saat input teks diperlukan.
Khusus iOS.
import { TextInteraction } from '@capgo/capacitor-textinteraction';
const result = await TextInteraction.toggle({ enabled: true });console.log(result);Referensi Tipe
Bagian berjudul “Type Reference”TextInteractionOptions
Bagian berjudul “TextInteractionOptions”export interface TextInteractionOptions { /** * Whether text interaction should be enabled or disabled. Disabling hides the * magnifier lens reintroduced with iOS 15. */ enabled: boolean;}TextInteractionResult
Bagian berjudul “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 }>;}Sumber Kebenaran
Bagian berjudul “Sumber Kebenaran”Halaman ini dibuat dari plugin src/definitions.ts. Jalankan ulang sync saat API publik berubah di upstream.
Lanjutkan dari Getting Started
Bagian berjudul “Lanjutkan dari Getting Started”Jika Anda menggunakan Panduan Memulai untuk merencanakan operasi dashboard dan API, hubungkan dengan Menggunakan @capgo/capacitor-textinteraction untuk kapabilitas native di Menggunakan @capgo/capacitor-textinteraction, Ikhtisar API untuk detail implementasi di Ringkasan API, Pendahuluan untuk detail implementasi di Pendahuluan, Kunci API untuk detail implementasi di API Keys, dan Perangkat untuk detail implementasi di Perangkat.