Skip to content

Commit

Permalink
update docs to align with the latest changes in medialibrary-pro (#3522)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasleitsch authored Feb 13, 2024
1 parent a1ab078 commit 5f18aa2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/advanced-usage/disable-cdn.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ title: Disable CDN
weight: 12
---

Media Library Pro uses a CDN to load the [Dragula](https://github.com/bevacqua/dragula) library. Dragula provides the drag-and-drop-ability inside a Media Library Pro component.
Media Library Pro uses a CDN to load the [Sortable](https://github.com/SortableJS/Sortable) library. Sortable provides the drag-and-drop-ability inside a Media Library Pro component.

If you would like to disable the loading via CDN and want to take care by yourself of including Dragula you will need to add the following option to your `media-library.php` config file.
If you would like to disable the loading via CDN and want to take care by yourself of including Sortable you will need to add the following option to your `media-library.php` config file.

```php
...
/*
* When disabling this option, Media Library Pro don't include a script tag to load the dragula library via a CDN.
* You have to include the dragula library by yourself!
*/
'include_dragula_cdn_script' => false,
* When disabling this option, Media Library Pro don't include a script tag to load the Sortable library via a CDN.
* You have to include the Sortable library by yourself!
*/
'include_sortable_cdn_script' => false,
...
```
You can install Dragula within your project dependencies and include it in your `app.js`.
You can install Sortable within your project dependencies and include it in your `app.js`.

```js
import dragula from 'dragula';
import Sortable from 'sortablejs'

window.dragula = dragula;
window.Sortable = Sortable
```

0 comments on commit 5f18aa2

Please sign in to comment.