PHP Classes
elePHPant
Icontem

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    
Last Updated Ratings Unique User Downloads Download Rankings
2015-03-14 (4 years ago) RSS 2.0 feedNot enough user ratingsTotal: 349 All time: 6,861 This week: 326Up
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.

  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: 276776 in Russian Federation Russian Federation
Week rank: 725 Up27 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:349
This week:0
All time:6,861
This week:326Up