Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangjchandler authored Jan 29, 2021
1 parent 866168d commit 2b3e8fd
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This plugin adds a new `$clipboard` magic property to all of your Alpine compone
Include the following `<script>` tag at the end of your `<body>`:

```html
<script src="https://cdn.jsdelivr.net/npm/@ryangjchandler/alpine-clipboard@0.2.x/dist/alpine-clipboard.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@ryangjchandler/alpine-clipboard@1.x.x/dist/alpine-clipboard.js"></script>
```

### NPM
Expand All @@ -35,6 +35,23 @@ import "@ryangjchandler/alpine-clipboard"
// import "alpinejs"
```

#### Legacy Browser Support

If you need to support legacy browsers, you can import the `alpine-clipboard.ie11.js` file instead.

**CDN**

```
<script src="https://cdn.jsdelivr.net/npm/@ryangjchandler/[email protected]/dist/alpine-clipboard.ie11.js"></script>
```

**NPM**

```js
import "@ryangjchandler/alpine-clipboard/src/index.ie11.js"
// import "alpinejs"
```

## Usage

To copy some data to the clipboard, invoke `$clipboard` from an event handler in your component.
Expand Down

0 comments on commit 2b3e8fd

Please sign in to comment.