-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Egor Didenko
committed
Jul 22, 2024
1 parent
306b257
commit 4d7f29c
Showing
1 changed file
with
13 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,59 +71,59 @@ We use [JSDoc type annotations](https://www.typescriptlang.org/docs/handbook/int | |
|
||
```html | ||
<script type="module"> | ||
import * as UC from 'https://cdn.jsdelivr.net/npm/@uploadcare/blocks@{{PACKAGE_VERSION}}/web/blocks.min.js'; | ||
import * as UC from 'https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@{{PACKAGE_VERSION}}/web/blocks.min.js'; | ||
UC.registerBlocks(UC); | ||
</script> | ||
``` | ||
|
||
2. Start using Uploadcare Blocks in your application markup (don't forget to specify `{{PACKAGE_VERSION}}` with the [latest one](https://github.com/uploadcare/blocks/releases)): | ||
2. Start using Uploadcare Blocks in your application markup (don't forget to specify `{{PACKAGE_VERSION}}` with the [latest one](https://github.com/uploadcare/file-uploader/releases)): | ||
|
||
```html | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/@uploadcare/blocks@{{PACKAGE_VERSION}}/web/lr-file-uploader-regular.min.css" | ||
href="https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@{{PACKAGE_VERSION}}/web/uc-file-uploader-regular.min.css" | ||
/> | ||
|
||
<lr-file-uploader-regular ctx-name="my-uploader"> </lr-file-uploader-regular> | ||
<uc-file-uploader-regular ctx-name="my-uploader"> </uc-file-uploader-regular> | ||
``` | ||
|
||
3. Configure Uploadcare Blocks and add your personal public key to the project. Discover the instructions in the [following section](#configuration). | ||
|
||
### From NPM | ||
|
||
1. Install Uploadcare Blocks package: `npm i --save-exact @uploadcare/blocks` | ||
1. Install Uploadcare Blocks package: `npm i --save-exact @uploadcare/file-uploader` | ||
2. Connect `Blocks` from your script file: | ||
|
||
```js | ||
import * as UC from '@uploadcare/blocks'; | ||
import * as UC from '@uploadcare/file-uploader'; | ||
|
||
UC.registerBlocks(UC); | ||
``` | ||
|
||
3. Start using Uploadcare Blocks in your application markup and replace `{{PACKAGE_VERSION}}` with the [latest version](https://github.com/uploadcare/blocks/releases) of the package: | ||
3. Start using Uploadcare Blocks in your application markup and replace `{{PACKAGE_VERSION}}` with the [latest version](https://github.com/uploadcare/file-uploader/releases) of the package: | ||
|
||
```html | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.jsdelivr.net/npm/@uploadcare/blocks@{{PACKAGE_VERSION}}/web/lr-file-uploader-regular.min.css" | ||
href="https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@{{PACKAGE_VERSION}}/web/uc-file-uploader-regular.min.css" | ||
/> | ||
|
||
<lr-file-uploader-inline ctx-name="my-uploader"> </lr-file-uploader-inline> | ||
<uc-file-uploader-inline ctx-name="my-uploader"> </uc-file-uploader-inline> | ||
``` | ||
|
||
4. Configure Uploadcare Blocks and add your personal public key to the project. Discover the instructions in the [following section](#configuration). | ||
|
||
### Configuration | ||
|
||
All configurations in Uploadcare Blocks are managed from `lr-config` block. | ||
All configurations in Uploadcare Blocks are managed from `uc-config` block. | ||
|
||
1. Sign up to [Uploadcare](https://app.uploadcare.com/accounts/signup/?ref=github-readme). | ||
2. Get a Public API key in [Uploadcare project's dashboard](https://app.uploadcare.com/projects/-/api-keys/?ref=github-readme). | ||
3. Add a `lr-config` block to your markup and replace `YOUR_PUBLIC_KEY` with your own public key: | ||
3. Add a `uc-config` block to your markup and replace `YOUR_PUBLIC_KEY` with your own public key: | ||
|
||
```html | ||
<lr-config ctx-name="my-uploader" pubkey="YOUR_PUBLIC_KEY"></lr-config> | ||
<uc-config ctx-name="my-uploader" pubkey="YOUR_PUBLIC_KEY"></uc-config> | ||
``` | ||
|
||
4. Make sure that your config block uses the same `ctx-name` attribute value as your solution block. | ||
|
@@ -156,7 +156,7 @@ All the source code is accessible and works in raw mode. Use _developer tools_ t | |
|
||
You’re always welcome to contribute: | ||
|
||
- Create [issues](https://github.com/uploadcare/blocks/issues) every time you feel something is missing or goes wrong. | ||
- Create [issues](https://github.com/uploadcare/file-uploader/issues) every time you feel something is missing or goes wrong. | ||
- Provide your feedback or drop us a support request at <a href="mailto:[email protected]">[email protected]</a>. | ||
- Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/uploadcare) with "uploadcare" tag if others can have these questions as well. | ||
- Fork project, make changes and send it as pull request. For launching the developing mode follow these commands: | ||
|