dev-master
9999999-dev http://backender.chSymfony2 bundle for easy integration of the EpicEditor
MIT
The Requires
by Marc Juchli
editor markdown epiceditor
 Wallogit.com
                    
                    2017 © Pedro Peláez
                         Wallogit.com
                    
                    2017 © Pedro Peláez
                    
                    
                    
                    
                
                
            
Symfony2 bundle for easy integration of the EpicEditor
This bundle provides a EpicEditor integration for your Symfony2 Project. It simply adds the form field type epiceditor to the Form Component., (*1)
For more information about EpicEditor see: http://oscargodson.github.com/EpicEditor/, (*2)
{
    "require": {
        "Backender/epiceditor-bundle": "*"
    }
}
Update your project dependencies:, (*3)
php composer.phar update Backender/epiceditor-bundle
``` php <?php // app/AppKernel.php, (*4)
public function registerBundles() { $bundles = array( // ... new Backender\EpiceditorBundle\BackenderEpiceditorBundle(), ); }, (*5)
### Step 3: Install bundle assets ```bash $ php ./app/console assets:install web --symlink
--symlink is optional, (*6)
For a full configuration dump use:, (*7)
$ php ./app/console config:dump-reference BackenderEpiceditorBundle
An example configuration:, (*8)
backender_epiceditor:  
    class:                Backender\EpiceditorBundle\Form\Type\EpiceditorType 
    container:            epiceditor 
    basepath:             /web/bundles/backenderepiceditor 
    clientSideStorage:    true 
    localStorageName:     epiceditor 
    parser:               marked 
    focusOnLoad:          false 
    file:                 
        name:                 epiceditor 
        defaultContent:       
        autoSave:             100 
    theme:                
        base:                 /themes/base/epiceditor.css 
        preview:              /themes/preview/github.css 
        editor:               /themes/editor/epic-dark.css 
    shortcut:             
        modifier:             18 
        fullscreen:           70 
        preview:              80 
        edit:                 79 
Or even overwrite the configuration within a FormBuilder (see Step 5)., (*9)
Example form:, (*10)
<?php
$form = $this->createFormBuilder($post)
    ->add('content', 'epiceditor', array(
            'container'             => 'epiceditor',
            'basepath'              => '/~marc/blog/web/bundles/backenderepiceditor',
            'clientSideStorage'     => true,
            'localStorageName'      => 'epiceditor',
            'parser'                => 'marked',
            'focusOnLoad'           => false,
            'file'                  => array(
                'name'              => 'epiceditor',
                'defaultContent'    => '',
                'autoSave'          => 100
            ),
            'theme'                 => array(
                'base'              => '/themes/base/epiceditor.css',
                'preview'           => '/themes/preview/github.css',
                'editor'            => '/themes/editor/epic-dark.css'
            ),
            'shortcut'              => array(
                'modifier'          => 18,
                'fullscreen'        => 70,
                'preview'           => 80,
                'edit'              => 79
            )
        ))
        ->getForm()
;
Note: All parameters from config.yml can be overwritten in a form (excluding class)., (*11)
If the bundle doesn't allow you to customize an option, I invite you to fork the project, create a feature branch, and send a pull request., (*12)
To ensure a consistent code base, you should make sure the code follows the Coding Standards., (*13)
This bundle is under the MIT license. See the complete license here., (*14)
Symfony2 bundle for easy integration of the EpicEditor
MIT
editor markdown epiceditor