[DOCKER] What I stumbled upon when installing Laravel-filemanager

Introduced CKEditor

Reference site When implementing an editor for blog articles, etc., CKEditor! Even more convenient, cool and easy to use! There is a sample source

   <textarea id="ckeditor" name="pageBody"></textarea>

    {{-- CKEditor --}}
    <script src="//cdn.ckeditor.com/4.15.0/full/ckeditor.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
    <script src="js/ckeditor.js"></script>
$(function () {
    //Apply settings to the editor
    CKEDITOR.replace("ckeditor", {
        uiColor: "#EEEEEE",
        height: 400,

        //Spell check function OFF
        scayt_autoStartup: false,

        //Insert line break tag when pressing Enter
        enterMode: CKEDITOR.ENTER_BR,

        // Shift+Insert paragraph tag when pressing Enter
        shiftEnterMode: CKEDITOR.ENTER_P,

        //Allow id and class to be specified
        allowedContent: true,

        //File manager related
        filebrowserImageBrowseUrl: "/laravel-filemanager?type=Images",
        filebrowserImageUploadUrl:
            "/laravel-filemanager/upload?type=Images&_token=",
        filebrowserBrowseUrl: "/laravel-filemanager?type=Files",
        filebrowserUploadUrl: "/laravel-filemanager/upload?type=Files&_token=",

        //When inserting pre code
        format_pre: {
            element: "pre",
            attributes: {
                class: "code",
            },
        },
        //Delete tag breadcrumb trail
        removePlugins: "elementspath",
        //Make plain text paste even when copying and pasting from the web
        forcePasteAsPlainText: true,
        //Do not insert spaces automatically
        fillEmptyBlocks: false,
        //Disable tab input
        tabSpaces: 0,
    });
};

Introduce image upload function to CKEditor

Reference site Laravel's file management library Laravel File Manager

I got an error when I tried to install

composer require unisharp/laravel-filemanager

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for unisharp/laravel-filemanager ^2.2 -> satisfiable by unisharp/laravel-filemanager[v2.2.0].
    - unisharp/laravel-filemanager v2.2.0 requires ext-exif * -> the requested PHP extension exif is missing from your system.

--It seems that you need an EXIF ​​module to get EXIF ​​information from images in PHP

Reference site Enable EXIF ​​with PHP on docker

Add the following to DockerFile and build again

RUN docker-php-ext-install exif
RUN docker-php-ext-configure exif \
            --enable-exif

I installed it again and it succeeded!

composer require unisharp/laravel-filemanager

Recommended Posts

What I stumbled upon when installing Laravel-filemanager
What I stumbled upon when installing Ruby on Ubuntu
What I stumbled upon in the ActiveModel :: Serializer test
What I did when I stumbled on IntelliJ gradle 2.2 → 2.6 environment migration
I stumbled upon Netbeans + JDBC + Amazon Athena
What I did when I converted java to Kotlin
[Swift] Beginners stumbled upon installing CocoaPods & installation procedure
What I thought when I started working as an engineer
[Beginner] I stumbled upon launching a project with Rails6
What I learned when building a server in Java
What I learned ② ~ Mock ~
What I learned ① ~ DJUnit ~
What I was addicted to when introducing the JNI library
What I fixed when updating to Spring Boot 1.5.12 ・ What I was addicted to
A note of what I stumbled upon and noticed in catching up with Laravel from Rails