Imagemanager

Upload or choose and insert images to tell a more visual story.

    Demo

    Code

    <!DOCTYPE html>
    <html>
        <head>
            <title>Redactor</title>
            <meta charset="utf-8">
    
            <!-- redactor css -->
            <link rel="stylesheet" href="/your-folder/redactor.css" />
        </head>
        <body>
            <!-- element -->
            <textarea id="content">...</textarea>
    
            <!-- redactor js -->
            <script src="/your-folder/redactor.js"></script>
    
            <!-- plugin js -->
            <script src="/your-folder/plugins/imagemanager.js"></script>
    
            <!-- call -->
            <script>
            $R('#content', {
                plugins: ['imagemanager'],
                imageUpload: '/your-upload-script/',
                imageManagerJson: '/your-folder/images.json'
            });
            </script>
        </body>
    </html>

    Usage

    images.json example:

    [
        {
            "thumb": "/image-thumbnail-url/1.jpg",
            "url": "/image-url/1.jpg",
            "id": "img1",
            "title": "Image 1"
        },
        {
            "thumb": "/image-thumbnail-url/2.jpg",
            "url": "/image-url/2.jpg",
            "id": "img2",
            "title": "Image 2"
        }
    ]