@@ -48,6 +48,7 @@ Check `vendor/unisharp/laravel-filemanager/src/views/demo.blade.php`, which alre
4848 ```
4949
5050### Option 2: TinyMCE4
51+
5152 ```html
5253 <script src =" //cdn.tinymce.com/4/tinymce.min.js" ></script >
5354 <textarea name =" content" class =" form-control my-editor" >{!! old('content', $content) !!}</textarea >
@@ -92,42 +93,43 @@ Check `vendor/unisharp/laravel-filemanager/src/views/demo.blade.php`, which alre
9293##Standalone button
9394If you are going to use filemanager independently, meaning set the value of an input to selected photo/file url, follow this structure:
9495
95- 1 . Create a button, input, and image preview holder if you are going to choose images.
96+ 1 . Create a button, input, and image preview holder if you are going to choose images.
9697
9798 Specify the id to the input and image preview by ` data-input ` and ` data-preview ` .
9899
99- ``` html
100- <div class =" input-group" >
101- <span class =" input-group-btn" >
102- <a id =" lfm" data-input =" thumbnail" data-preview =" holder" class =" btn btn-primary" >
103- <i class =" fa fa-picture-o" ></i > Choose
104- </a >
105- </span >
106- <input id =" thumbnail" class =" form-control" type =" text" name =" filepath" >
107- </div >
108- <img id =" holder" style =" margin-top :15px ;max-height :100px ;" >
109- ```
110-
111- 1 . Import lfm.js(run ` php artisan vendor:publish ` if you need).
100+ ``` html
101+ <div class =" input-group" >
102+ <span class =" input-group-btn" >
103+ <a id =" lfm" data-input =" thumbnail" data-preview =" holder" class =" btn btn-primary" >
104+ <i class =" fa fa-picture-o" ></i > Choose
105+ </a >
106+ </span >
107+ <input id =" thumbnail" class =" form-control" type =" text" name =" filepath" >
108+ </div >
109+ <img id =" holder" style =" margin-top :15px ;max-height :100px ;" >
110+ ```
111+
112+ 1. Import lfm.js(run `php artisan vendor:publish` if you need).
112113
113- ``` html
114- <script src =" /vendor/laravel-filemanager/js/lfm.js" ></script >
115- ```
114+ ```html
115+ <script src =" /vendor/laravel-filemanager/js/lfm.js" ></script >
116+ ```
116117
117- 1 . Init filemanager with type. (requires jQuery)
118+ 1. Init filemanager with type. (requires jQuery)
118119
119- ``` javascript
120- $ (' #lfm' ).filemanager (' image' );
121- ```
120+ ```javascript
121+ $('#lfm').filemanager('image');
122+ ```
123+
122124 or
123125
124- ``` javascript
125- $ (' #lfm' ).filemanager (' file' );
126- ```
126+ ```javascript
127+ $('#lfm').filemanager('file');
128+ ```
127129
128130 Domain can be specified in the second parameter(optional, but will be required when developing on Windows mechines) :
129131
130- ``` javascript
131- var domain = " {{ url() }}" ;
132- $ (' #lfm' ).filemanager (' image' , {prefix: domain});
133- ```
132+ ```javascript
133+ var domain = "{{ url() }}";
134+ $('#lfm').filemanager('image', {prefix: domain});
135+ ```
0 commit comments