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

Recommend this page to a friend!
  Info   Documentation   View files (13)   Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 351 All time: 6,874 This week: 310
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: 277276 in Russian Federation Russian Federation
Week rank: 713 24 in Russian Federation Russian Federation
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  
File Role Description
Controller (1 file)
DependencyInjection (2 files)
Resources (4 directories)
composer.json Data Auxiliary data
GwinnTinymceFastloadBundle.php Class Class source
README.md Doc. Documentation

  Files  /  Controller  
File Role Description
   UploaderController.php Class Class source

  Files  /  DependencyInjection  
File Role Description
   Configuration.php Class Class source
   GwinnTinymceFastloadExtension.php Class Class source

  Files  /  Resources  
File Role Description
config (2 files)
public (3 directories)
translations (1 file)
views (1 directory)

  Files  /  Resources  /  config  
File Role Description
   routing.yml Data Auxiliary data
   services.yml Data Auxiliary data

  Files  /  Resources  /  public  
File Role Description
css (1 file)
images (1 file)
js (1 file)

  Files  /  Resources  /  public  /  css  
File Role Description
   tinymce-fastload.css Data Auxiliary data

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

  Files  /  Resources  /  public  /  js  
File Role Description
   tinymce-fastload.js Data Auxiliary data

  Files  /  Resources  /  translations  
File Role Description
   messages.ru.xlf Data Auxiliary data

  Files  /  Resources  /  views  
File Role Description
Uploader (1 file)

  Files  /  Resources  /  views  /  Uploader  
File Role Description
   tinymce_file_uploader.html.twig Data Auxiliary data

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

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