diff --git a/blog_posts/copy-text-to-clipboard-with-javascript.md b/blog_posts/copy-text-to-clipboard-with-javascript.md index ae22d791a..64031cbe6 100644 --- a/blog_posts/copy-text-to-clipboard-with-javascript.md +++ b/blog_posts/copy-text-to-clipboard-with-javascript.md @@ -6,37 +6,34 @@ authors: chalarangelo cover: blog_images/typing.jpg excerpt: Learn how to programmatically copy text to clipboard with a few lines of JavaScript and level up your web development skills. firstSeen: 2020-01-20T11:41:23+02:00 -lastUpdated: 2021-06-12T19:30:41+03:00 +lastUpdated: 2022-01-11T09:47:54+03:00 --- -### Core functionality +### Asynchronous Clipboard API -A very common need when building websites is the ability to copy text to clipboard with a single button click. Javascript can easily do this in five short steps: +A very common need when building websites is the ability to copy text to clipboard with a single button click. If you only need to support modern browsers, it's highly recommended to use the asynchronous [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API). It's supported in all modern browsers and provides an easy and secure way to update the clipboard's contents. -1. Create a`