Integration CodeMirror in you symfony2 project.
JavaScript PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Asset
DependencyInjection
Form/Type
Resources
Tests
Twig
.travis.yml
README.md
SolutionCodeMirrorBundle.php
composer.json
phpunit.xml.dist

README.md

SolutionCodeMirrorBundle Build Status

Bundle not yet ready.

Integration CodeMirror editor in you symfony2 project.

###Install

Just add the following line to your projects composer.json require section, and update vendors:

"solution/code-mirror-bundle": "dev-master"

Enable bundle , add to AppKernel.php:

 new Solution\CodeMirrorBundle\SolutionCodeMirrorBundle()

###Configuration Add default parameters to config.yml:

twig:
    form:
        resources:
            - 'SolutionCodeMirrorBundle:Form:redactor_widget.html.twig'

solution_code_mirror:
    parameters:
      mode: text/html
      lineNumbers: true
      lineWrapping: true
    mode_dirs:
      - @SolutionCodeMirrorBundle/Resources/public/js/mode
    themes_dirs:
      - @SolutionCodeMirrorBundle/Resources/public/css/theme

Install assets:

$ ./app/console assets:install web --symlink

###Usage

 $builder->add('content', 'code_mirror', array(
    'required' => true,
    'parameters' => array(
         'lineNumbers' => 'true'
     )
 ));