TinyMCE Fastload Bundle: Upload images to be displayed in WYSIWYG editor

Recommend this page to a friend!
  Info   View files Documentation   View files View files (13)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 351 All time: 6,875 This week: 310Up
Version License PHP version Categories
tinymce-fastload 1.0.0MIT/X Consortium ...5.3.0PHP 5, Graphics, Files and Folders, C...
Description Author

This package can upload images to be displayed in WYSIWYG editor.

It extends the TinyMCE Symfony bundle by adding an image upload button.

The image is upload imedidately using an AJAX request, so it can be used right after the upload to be inserted in a TinyMCE WYSIWYG editor.

Picture of Alex Lushpai
  Performance   Level  
Name: Alex Lushpai is available for providing paid consulting. Contact Alex Lushpai .
Classes: 4 packages by
Country: Russian Federation Russian Federation
Age: 35
All time rank: 277676 in Russian Federation Russian Federation
Week rank: 625 Up22 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 2x

Details

TinymceFastloadBundle

This bundle extends https://github.com/stfalcon/TinymceBundle so https://github.com/stfalcon/TinymceBundle/blob/master/README.md must be readed first

Installation

Add bundle as a dependency to the composer.json of your application

    "require": {
        ...
        "gwinn/tinymce-fastload-bundle": "dev-master"
        ...
    },

Add bundle to your application kernel.

// app/AppKernel.php
<?php
    // ...
    public function registerBundles()
    {
        $bundles = array(
            ...
            new Gwinn\TinymceFastloadBundle\GwinnTinymceFastloadBundle(),
        );
    }

Configuration

config.yml

Similar to tinymce-bundle, just add to assetic & stfalcon_tinymce section in config.yml

assetic:
    ...
    bundles:
        - GwinnTinymceFastloadBundle
    ...

stfalcon_tinymce:
    ...
    tinymce_buttons:
        image_uploader:
        title: "Upload Image"
        image: "asset[bundles/gwinntinymcefastload/images/upload.png]"
    ...
    theme:
        simple:
            toolbar: "... | image_uploader | ..."

parameters.yml

Add path to upload folder

    tinymce-fastload-savepath: "%kernel.root_dir%/../web/files/"

routing.yml

Add bundle routes

    tinymce_fastload_uploader:
        resource: "@GwinnTinymceFastloadBundle/Resources/config/routing.yml"
        prefix:   /

Include in template

{% extends '::base.html.twig' %}

{% block body %}
    <form action="path('lab_basic_homepage')" method="post">
        <div>
            <textarea class="tinymce" name="simple-text"></textarea>
        </div>
    </form>

    {{ tinymce_init() }}
    {% include 'GwinnTinymceFastloadBundle:Uploader:tinymce_file_uploader.html.twig' %}

{% endblock %}

{% block stylesheets %}
    {% stylesheets filter='cssrewrite' output='css/compiled/style.css' 'bundles/gwinntinymcefastload/css/*' %}
        <link rel="stylesheet" href="{{ asset_url }}" />
    {% endstylesheets %}
{% endblock %}

Copy resources to web folder

    php app/console assets:install web/
  Files folder image Files  
File Role Description
Files folder imageController (1 file)
Files folder imageDependencyInjection (2 files)
Files folder imageResources (4 directories)
Plain text file composer.json Data Auxiliary data
Plain text file GwinnTinymceFastloadBundle.php Class Class source
Plain text file README.md Doc. Documentation

  Files folder image Files  /  Controller  
File Role Description
  Plain text file UploaderController.php Class Class source

  Files folder image Files  /  DependencyInjection  
File Role Description
  Plain text file Configuration.php Class Class source
  Plain text file GwinnTinymceFastloadExtension.php Class Class source

  Files folder image Files  /  Resources  
File Role Description
Files folder imageconfig (2 files)
Files folder imagepublic (3 directories)
Files folder imagetranslations (1 file)
Files folder imageviews (1 directory)

  Files folder image Files  /  Resources  /  config  
File Role Description
  Plain text file routing.yml Data Auxiliary data
  Plain text file services.yml Data Auxiliary data

  Files folder image Files  /  Resources  /  public  
File Role Description
Files folder imagecss (1 file)
Files folder imageimages (1 file)
Files folder imagejs (1 file)

  Files folder image Files  /  Resources  /  public  /  css  
File Role Description
  Plain text file tinymce-fastload.css Data Auxiliary data

  Files folder image Files  /  Resources  /  public  /  images  
File Role Description
  Image file upload.png Icon Icon image

  Files folder image Files  /  Resources  /  public  /  js  
File Role Description
  Plain text file tinymce-fastload.js Data Auxiliary data

  Files folder image Files  /  Resources  /  translations  
File Role Description
  Plain text file messages.ru.xlf Data Auxiliary data

  Files folder image Files  /  Resources  /  views  
File Role Description
Files folder imageUploader (1 file)

  Files folder image Files  /  Resources  /  views  /  Uploader  
File Role Description
  Plain text file tinymce_file_uploader.html.twig Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:351
This week:0
All time:6,875
This week:310Up

For more information send a message to info at phpclasses dot org.