2017 © Pedro Peláez
 

symfony-bundle epiceditor-bundle

Symfony2 bundle for easy integration of the EpicEditor

image

backender/epiceditor-bundle

Symfony2 bundle for easy integration of the EpicEditor

  • Friday, February 8, 2013
  • by backender
  • Repository
  • 2 Watchers
  • 3 Stars
  • 79 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Symfony2 BackenderEpiceditorBundle

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)

Installation

  1. Add BackenderEpiceditorBundle to your composer.json
  2. Enable the bundle
  3. Install bundle assets
  4. Configure the bundle (optional)
  5. Add the editor to a form

Step 1: Add BackenderEpiceditorBundle to your composer.json

{
    "require": {
        "Backender/epiceditor-bundle": "*"
    }
}

Update your project dependencies:, (*3)

php composer.phar update Backender/epiceditor-bundle

Step 2: Enable the 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)

Step 4: Configure the bundle (optional)

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)

Step 5: Add the editor to a form

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)

Contribute

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)

License

This bundle is under the MIT license. See the complete license here., (*14)

Next Steps

  • Testing is coming soon

The Versions

08/02 2013

dev-master

9999999-dev http://backender.ch

Symfony2 bundle for easy integration of the EpicEditor

  Sources   Download

MIT

The Requires

 

by Marc Juchli

editor markdown epiceditor