PHP Classes

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

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 359 All time: 6,922 This week: 87Up
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: 39
All time rank: 276577 in Russian Federation Russian Federation
Week rank: 227 Up15 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 2x

Documentation

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 (13)  
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 (13)  /  Controller  
File Role Description
  Plain text file UploaderController.php Class Class source

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

  Files folder image Files (13)  /  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 (13)  /  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 (13)  /  Resources  /  public  
File Role Description
Files folder imagecss (1 file)
Files folder imageimages (1 file)
Files folder imagejs (1 file)

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

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

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

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

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

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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:359
This week:0
All time:6,922
This week:87Up