update v 1.0.7.5
This commit is contained in:
48
vendor/unisharp/laravel-filemanager/doc/customization.md
vendored
Normal file
48
vendor/unisharp/laravel-filemanager/doc/customization.md
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
## Documents
|
||||
|
||||
1. [Installation](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/installation.md)
|
||||
1. [Intergration](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/integration.md)
|
||||
1. [Config](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/config.md)
|
||||
1. [Customization](https://github.com/UniSharp/laravel-filemanager/blob/master/doc/customization.md)
|
||||
|
||||
## Customization
|
||||
|
||||
Feel free to customize the routes and views if your need.
|
||||
|
||||
### Routes
|
||||
|
||||
1. Copy the routes in /vendor/unisharp/laravel-filemanager/src/routes.php
|
||||
|
||||
1. Make sure urls below is correspond to your route :
|
||||
|
||||
CKEditor
|
||||
```javascript
|
||||
<script>
|
||||
CKEDITOR.replace( 'editor', {
|
||||
filebrowserImageBrowseUrl: '/your-custom-route?type=Images',
|
||||
filebrowserBrowseUrl: '/your-custom-route?type=Files',
|
||||
});
|
||||
</script>
|
||||
```
|
||||
|
||||
And be sure to include the `?type=Images` or `?type=Files` parameter.
|
||||
|
||||
TinyMCE
|
||||
```javascript
|
||||
...
|
||||
var cmsURL = editor_config.path_absolute + 'your-custom-route?field_name='+field_name+'&lang='+ tinymce.settings.language;
|
||||
if (type == 'image') {
|
||||
cmsURL = cmsURL + "&type=Images";
|
||||
} else {
|
||||
cmsURL = cmsURL + "&type=Files";
|
||||
}
|
||||
...
|
||||
```
|
||||
|
||||
### Views
|
||||
|
||||
1. Copy the views from /vendor/unisharp/laravel-filemanager/src/views/ :
|
||||
|
||||
```bash
|
||||
php artisan vendor:publish --tag=lfm_views
|
||||
```
|
Reference in New Issue
Block a user