Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@capacitor/clipboard
Advanced tools
The Clipboard API enables copy and pasting to/from the system clipboard.
The Clipboard API enables copy and pasting to/from the system clipboard.
npm install @capacitor/clipboard
npx cap sync
import { Clipboard } from '@capacitor/clipboard';
const writeToClipboard = async () => {
await Clipboard.write({
string: "Hello World!"
});
};
const checkClipboard = async () => {
const { type, value } = await Clipboard.read();
alert(`Got ${type} from clipboard: ${value}`);
};
write(options: WriteOptions) => Promise<void>
Write a value to the clipboard (the "copy" action)
Param | Type |
---|---|
options | WriteOptions |
Since: 1.0.0
read() => Promise<ReadResult>
Read a value from the clipboard (the "paste" action)
Returns: Promise<ReadResult>
Since: 1.0.0
Represents the data to be written to the clipboard.
Prop | Type | Description | Since |
---|---|---|---|
string | string | Text value to copy. | 1.0.0 |
image | string | Image in Data URL format to copy. | 1.0.0 |
url | string | URL string to copy. | 1.0.0 |
label | string | User visible label to accompany the copied data (Android Only). | 1.0.0 |
Represents the data read from the clipboard.
Prop | Type | Description | Since |
---|---|---|---|
value | string | Data read from the clipboard. | 1.0.0 |
type | string | Type of data in the clipboard. | 1.0.0 |
FAQs
The Clipboard API enables copy and pasting to/from the system clipboard.
We found that @capacitor/clipboard demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.