jeudi 27 février 2020

Laravel + CKEditor + Laravel File Manager – do not display images

my form:

<form>
    <textarea name="editor1" id="editor1" rows="10" cols="80">
    </textarea>
</form>

<script src="https://cdn.ckeditor.com/4.13.1/standard/ckeditor.js"></script>
<script>
    var options = {
        filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images',
        filebrowserImageUploadUrl: '/laravel-filemanager/upload?type=Images&_token=',
        filebrowserBrowseUrl: '/laravel-filemanager?type=Files',
        filebrowserUploadUrl: '/laravel-filemanager/upload?type=Files&_token='
    };

    setTimeout(function(){
        CKEDITOR.replace( 'editor1', options );
    },100);
</script>

my route:

Route::middleware(['auth'])->group(function () {
    Route::get('/laravel-filemanager', '\UniSharp\LaravelFilemanager\Controllers\LfmController@show');
    Route::post('/laravel-filemanager/upload', '\UniSharp\LaravelFilemanager\Controllers\UploadController@upload');
});

enter image description here

Ckeditor is displayed. When I click on the img icon a window will open. But no files will be displayed.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire