Skip to content

Commit 37d359e

Browse files
committed
update links of all documents
1 parent 2f6f2fd commit 37d359e

File tree

8 files changed

+133
-147
lines changed

8 files changed

+133
-147
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ To preview all features, clone [Laravel Filemanager container](https://github.co
1414
* Please follow the intructions in [this document](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/upgrade.md) to upgrade.
1515

1616
## Documents
17-
1. [Installation](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/installation.md)
18-
1. [Integration](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/integration.md)
19-
1. [Config](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/config.md)
20-
1. [Customization](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/customization.md)
21-
1. [Events](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/events.md)
22-
1. [Upgrade](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/upgrade.md)
17+
1. [Installation](https://unisharp.github.io/laravel-filemanager/installation)
18+
1. [Integration](https://unisharp.github.io/laravel-filemanager/integration)
19+
1. [Config](https://unisharp.github.io/laravel-filemanager/config)
20+
1. [Customization](https://unisharp.github.io/laravel-filemanager/customization)
21+
1. [Events](https://unisharp.github.io/laravel-filemanager/events)
22+
1. [Upgrade](https://unisharp.github.io/laravel-filemanager/upgrade)
2323

2424
## Features
2525
* CKEditor and TinyMCE integration

docs/config.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Documents
2-
1. [Installation](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/installation.md)
3-
1. [Integration](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/integration.md)
4-
1. [Config](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/config.md)
5-
1. [Customization](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/customization.md)
6-
1. [Events](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/events.md)
7-
1. [Upgrade](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/upgrade.md)
2+
1. [Installation](installation)
3+
1. [Integration](integration)
4+
1. [Config](config)
5+
1. [Customization](customization)
6+
1. [Events](events)
7+
1. [Upgrade](upgrade)
88

99
## Config
1010
In `config/lfm.php` :

docs/customization.md

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Documents
2-
1. [Installation](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/installation.md)
3-
1. [Integration](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/integration.md)
4-
1. [Config](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/config.md)
5-
1. [Customization](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/customization.md)
6-
1. [Events](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/events.md)
7-
1. [Upgrade](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/upgrade.md)
2+
1. [Installation](installation)
3+
1. [Integration](integration)
4+
1. [Config](config)
5+
1. [Customization](customization)
6+
1. [Events](events)
7+
1. [Upgrade](upgrade)
88

99
## Customization
1010
Feel free to customize the routes and views if your need.
@@ -13,20 +13,14 @@ Feel free to customize the routes and views if your need.
1313
1. Copy the routes in `/vendor/unisharp/laravel-filemanager/src/routes.php`
1414

1515
1. Make sure urls below is correspond to your route (remember to include type parameter `?type=Images` or `?type=Files`) :
16-
17-
* CKEditor
18-
16+
* CKEditor
1917
```javascript
20-
<script>
21-
CKEDITOR.replace('editor', {
22-
filebrowserImageBrowseUrl: '/your-custom-route?type=Images',
23-
filebrowserBrowseUrl: '/your-custom-route?type=Files',
24-
});
25-
</script>
18+
CKEDITOR.replace('editor', {
19+
filebrowserImageBrowseUrl: '/your-custom-route?type=Images',
20+
filebrowserBrowseUrl: '/your-custom-route?type=Files'
21+
});
2622
```
27-
28-
* TinyMCE
29-
23+
* TinyMCE
3024
```javascript
3125
...
3226
var cmsURL = editor_config.path_absolute + 'your-custom-route?field_name='+field_name+'&lang='+ tinymce.settings.language;

docs/events.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Documents
2-
1. [Installation](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/installation.md)
3-
1. [Integration](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/integration.md)
4-
1. [Config](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/config.md)
5-
1. [Customization](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/customization.md)
6-
1. [Events](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/events.md)
7-
1. [Upgrade](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/upgrade.md)
2+
1. [Installation](installation)
3+
1. [Integration](integration)
4+
1. [Config](config)
5+
1. [Customization](customization)
6+
1. [Events](events)
7+
1. [Upgrade](upgrade)
88

99
## List of events
1010
* Unisharp\Laravelfilemanager\Events\ImageIsUpload
@@ -17,7 +17,7 @@
1717
* Unisharp\Laravelfilemanager\Events\FolderWasRenamed
1818

1919
## How to use
20-
* To use events you can add a listener to listen to the events
20+
* To use events you can add a listener to listen to the events.
2121

2222
Snippet for `EventServiceProvider`
2323

docs/index.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ To preview all features, clone [Laravel Filemanager container](https://github.co
1414
* Please follow the intructions in [this document](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/upgrade.md) to upgrade.
1515

1616
## Documents
17-
1. [Installation](https://unisharp.github.io/laravel-filemanager/installation)
18-
1. [Integration](https://unisharp.github.io/laravel-filemanager/integration)
19-
1. [Config](https://unisharp.github.io/laravel-filemanager/config)
20-
1. [Customization](https://unisharp.github.io/laravel-filemanager/customization)
21-
1. [Events](https://unisharp.github.io/laravel-filemanager/events)
22-
1. [Upgrade](https://unisharp.github.io/laravel-filemanager/upgrade)
17+
1. [Installation](installation)
18+
1. [Integration](integration)
19+
1. [Config](config)
20+
1. [Customization](customization)
21+
1. [Events](events)
22+
1. [Upgrade](upgrade)
2323

2424
## Features
2525
* CKEditor and TinyMCE integration

docs/installation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Documents
2-
1. [Installation](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/installation.md)
3-
1. [Integration](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/integration.md)
4-
1. [Config](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/config.md)
5-
1. [Customization](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/customization.md)
6-
1. [Events](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/events.md)
7-
1. [Upgrade](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/upgrade.md)
2+
1. [Installation](installation)
3+
1. [Integration](integration)
4+
1. [Config](config)
5+
1. [Customization](customization)
6+
1. [Events](events)
7+
1. [Upgrade](upgrade)
88

99
## Requirements
1010
* php >= 5.4

docs/integration.md

Lines changed: 77 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,96 @@
11
## Documents
2-
1. [Installation](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/installation.md)
3-
1. [Integration](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/integration.md)
4-
1. [Config](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/config.md)
5-
1. [Customization](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/customization.md)
6-
1. [Events](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/events.md)
7-
1. [Upgrade](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/upgrade.md)
2+
1. [Installation](installation)
3+
1. [Integration](integration)
4+
1. [Config](config)
5+
1. [Customization](customization)
6+
1. [Events](events)
7+
1. [Upgrade](upgrade)
88

99
## Note
1010
Check `vendor/unisharp/laravel-filemanager/src/views/demo.blade.php`, which already integrated all options from below.
1111

1212
## WYSIWYG Editor Integration:
1313
### Option 1: CKEditor
14-
1. Install [laravel-ckeditor](https://github.com/UniSharp/laravel-ckeditor) package
1514

16-
1. Modify the views
15+
```html
16+
<textarea id="my-editor" name="content" class="form-control">{!! old('content', 'test editor content') !!}</textarea>
17+
<script src="//cdn.ckeditor.com/4.6.2/standard/ckeditor.js"></script>
18+
<script>
19+
var options = {
20+
filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images',
21+
filebrowserImageUploadUrl: '/laravel-filemanager/upload?type=Images&_token={{csrf_token()}}',
22+
filebrowserBrowseUrl: '/laravel-filemanager?type=Files',
23+
filebrowserUploadUrl: '/laravel-filemanager/upload?type=Files&_token={{csrf_token()}}'
24+
};
25+
</script>
26+
```
27+
28+
* Sample 1 - Replace by ID:
1729

18-
* Sample 1 - Replace by ID:
19-
20-
```html
21-
<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
22-
<textarea id="my-editor" name="content" class="form-control">{!! old('content', 'test editor content') !!}</textarea>
23-
<script>
24-
CKEDITOR.replace( 'my-editor', {
25-
filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images',
26-
filebrowserImageUploadUrl: '/laravel-filemanager/upload?type=Images&_token={{csrf_token()}}',
27-
filebrowserBrowseUrl: '/laravel-filemanager?type=Files',
28-
filebrowserUploadUrl: '/laravel-filemanager/upload?type=Files&_token={{csrf_token()}}'
29-
});
30-
</script>
31-
```
32-
33-
* Sample 2 - With JQuery Selector:
34-
35-
```html
36-
<script src="/vendor/unisharp/laravel-ckeditor/ckeditor.js"></script>
37-
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
38-
<script src="/vendor/unisharp/laravel-ckeditor/adapters/jquery.js"></script>
39-
<textarea name="content" class="form-control my-editor">{!! old('content', 'test editor content') !!}</textarea>
40-
<script>
41-
$('textarea.my-editor').ckeditor({
42-
filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images',
43-
filebrowserImageUploadUrl: '/laravel-filemanager/upload?type=Images&_token={{csrf_token()}}',
44-
filebrowserBrowseUrl: '/laravel-filemanager?type=Files',
45-
filebrowserUploadUrl: '/laravel-filemanager/upload?type=Files&_token={{csrf_token()}}'
46-
});
47-
</script>
48-
```
30+
```html
31+
<script>
32+
CKEDITOR.replace('my-editor', options);
33+
</script>
34+
```
4935

50-
### Option 2: TinyMCE4
36+
* Sample 2 - With JQuery Selector:
5137

5238
```html
53-
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
54-
<textarea name="content" class="form-control my-editor">{!! old('content', $content) !!}</textarea>
39+
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
40+
<script src="/vendor/unisharp/laravel-ckeditor/adapters/jquery.js"></script>
5541
<script>
56-
var editor_config = {
57-
path_absolute : "/",
58-
selector: "textarea.my-editor",
59-
plugins: [
60-
"advlist autolink lists link image charmap print preview hr anchor pagebreak",
61-
"searchreplace wordcount visualblocks visualchars code fullscreen",
62-
"insertdatetime media nonbreaking save table contextmenu directionality",
63-
"emoticons template paste textcolor colorpicker textpattern"
64-
],
65-
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media",
66-
relative_urls: false,
67-
file_browser_callback : function(field_name, url, type, win) {
68-
var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
69-
var y = window.innerHeight|| document.documentElement.clientHeight|| document.getElementsByTagName('body')[0].clientHeight;
70-
71-
var cmsURL = editor_config.path_absolute + 'laravel-filemanager?field_name=' + field_name;
72-
if (type == 'image') {
73-
cmsURL = cmsURL + "&type=Images";
74-
} else {
75-
cmsURL = cmsURL + "&type=Files";
76-
}
77-
78-
tinyMCE.activeEditor.windowManager.open({
79-
file : cmsURL,
80-
title : 'Filemanager',
81-
width : x * 0.8,
82-
height : y * 0.8,
83-
resizable : "yes",
84-
close_previous : "no"
85-
});
86-
}
87-
};
88-
89-
tinymce.init(editor_config);
42+
$('textarea.my-editor').ckeditor(options);
9043
</script>
9144
```
9245

93-
##Standalone button
94-
If you are going to use filemanager independently, meaning set the value of an input to selected photo/file url, follow this structure:
46+
### Option 2: TinyMCE4
9547

96-
1. Create a button, input, and image preview holder if you are going to choose images.
48+
```html
49+
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
50+
<textarea name="content" class="form-control my-editor">{!! old('content', $content) !!}</textarea>
51+
<script>
52+
var editor_config = {
53+
path_absolute : "/",
54+
selector: "textarea.my-editor",
55+
plugins: [
56+
"advlist autolink lists link image charmap print preview hr anchor pagebreak",
57+
"searchreplace wordcount visualblocks visualchars code fullscreen",
58+
"insertdatetime media nonbreaking save table contextmenu directionality",
59+
"emoticons template paste textcolor colorpicker textpattern"
60+
],
61+
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media",
62+
relative_urls: false,
63+
file_browser_callback : function(field_name, url, type, win) {
64+
var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
65+
var y = window.innerHeight|| document.documentElement.clientHeight|| document.getElementsByTagName('body')[0].clientHeight;
66+
67+
var cmsURL = editor_config.path_absolute + 'laravel-filemanager?field_name=' + field_name;
68+
if (type == 'image') {
69+
cmsURL = cmsURL + "&type=Images";
70+
} else {
71+
cmsURL = cmsURL + "&type=Files";
72+
}
9773
98-
Specify the id to the input and image preview by `data-input` and `data-preview`.
74+
tinyMCE.activeEditor.windowManager.open({
75+
file : cmsURL,
76+
title : 'Filemanager',
77+
width : x * 0.8,
78+
height : y * 0.8,
79+
resizable : "yes",
80+
close_previous : "no"
81+
});
82+
}
83+
};
84+
85+
tinymce.init(editor_config);
86+
</script>
87+
```
88+
89+
## Standalone button
90+
If you are going to use filemanager independently, meaning set the value of an input to selected photo/file url, follow this structure:
91+
92+
1. Create a button, input, and image preview holder if you are going to choose images.
93+
Specify the id to the input and image preview by `data-input` and `data-preview`.
9994

10095
```html
10196
<div class="input-group">
@@ -108,21 +103,18 @@ If you are going to use filemanager independently, meaning set the value of an i
108103
</div>
109104
<img id="holder" style="margin-top:15px;max-height:100px;">
110105
```
111-
112-
1. Import lfm.js(run `php artisan vendor:publish` if you need).
106+
1. Import lfm.js(run `php artisan vendor:publish` if you need).
113107

114108
```html
115109
<script src="/vendor/laravel-filemanager/js/lfm.js"></script>
116110
```
117111

118-
1. Init filemanager with type. (requires jQuery)
112+
1. Init filemanager with type. (requires jQuery)
119113

120114
```javascript
121115
$('#lfm').filemanager('image');
122116
```
123-
124117
or
125-
126118
```javascript
127119
$('#lfm').filemanager('file');
128120
```

docs/upgrade.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
## Documents
2-
3-
1. [Installation](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/installation.md)
4-
1. [Integration](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/integration.md)
5-
1. [Config](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/config.md)
6-
1. [Customization](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/customization.md)
7-
1. [Events](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/events.md)
8-
1. [Upgrade](https://github.com/UniSharp/laravel-filemanager/blob/master/docs/upgrade.md)
2+
1. [Installation](installation)
3+
1. [Integration](integration)
4+
1. [Config](config)
5+
1. [Customization](customization)
6+
1. [Events](events)
7+
1. [Upgrade](upgrade)
98

109
## Upgrade instructions
1110

1211
1. Please backup your own `config/lfm.php` before upgrading.
12+
1313
1. Run commands:
1414

15-
```bash
16-
composer update unisharp/laravel-filemanager
17-
php artisan vendor:publish --tag=lfm_view --force
18-
php artisan vendor:publish --tag=lfm_public --force
19-
php artisan vendor:publish --tag=lfm_config --force
20-
```
15+
```bash
16+
composer update unisharp/laravel-filemanager
17+
php artisan vendor:publish --tag=lfm_view --force
18+
php artisan vendor:publish --tag=lfm_public --force
19+
php artisan vendor:publish --tag=lfm_config --force
20+
```
2121

2222
1. Clear browser cache if page is broken after upgrading.
2323

0 commit comments

Comments
 (0)