Web APIs

Clipboard API

Checking compatibility...

Programmatically access system clipboard for copying and pasting text, images, and rich content. Handle clipboard events and permissions in web applications.

Read from Clipboard

This example shows how to access text that's already on your clipboard, letting your app work with content you've copied from elsewhere.

=
=
=
=
=
=

Output

Click Run to see output...

Write to Clipboard

This example demonstrates how to copy text to your clipboard with a single click, without needing to select text and use keyboard shortcuts.

=
=
=
=
=
=

Output

Click Run to see output...

Copy Event Handler

This example shows how to detect and modify text as it's being copied, allowing you to format or enhance content when users copy from your app.

=
=
=
=
=
=

Output

Click Run to see output...

Paste Event Handler

This example demonstrates how to capture and process content as it's being pasted into your app, giving you control over how pasted content is handled.

=
=
=
=
=
=

Output

Click Run to see output...