This package is abandoned and no longer maintained. The author suggests using the norberttech/aceeditor-bundle package instead.

Bundle that integrate excellent JavaScript ace editor into Symfony Form.

Installs: 204 085

Dependents: 4

Suggesters: 0

Security: 0

Stars: 24

Watchers: 5

Forks: 32

Open Issues: 0


4.0.2 2019-11-26 10:23 UTC

This package is auto-updated.

Last update: 2020-07-27 20:09:05 UTC



Bundle provides a Ace editor integration into Symfony Form component. It automatically register ace_editor form type.


This bundle is supporting following Symfony versions:


To use this bundle with Symfony ^4.0, require it in Composer:

composer require "norberttech/aceeditor-bundle" ^4.0

Register bundle in AppKernel.php

// app/AppKernel.php

public function registerBundles()
    return array(
        new Norzechowicz\AceEditorBundle\NorzechowiczAceEditorBundle(),
        // ...

Ace editor

Unles you do some configuration, this bundle expect Ace editor files to be in web/vendor/ace:

cd your_project_root/web
mkdir vendor && cd vendor
tar -xvf v1.2.6.tar.gz
mv ace-builds-1.2.6 ace
rm v1.2.6.tar.gz


use Norzechowicz\AceEditorBundle\Form\Extension\AceEditor\Type\AceEditorType;

/* @var $builder \Symfony\Component\Form\FormBuilderInterface */
$builder->add('description', AceEditorType::class, array(
    'wrapper_attr' => array(), // aceeditor wrapper html attributes.
    'width' => '100%',
    'height' => 250,
    'font_size' => 12,
    'mode' => 'ace/mode/html', // every single default mode must have ace/mode/* prefix
    'theme' => 'ace/theme/monokai', // every single default theme must have ace/theme/* prefix
    'tab_size' => null,
    'read_only' => null,
    'use_soft_tabs' => null,
    'use_wrap_mode' => null,
    'show_print_margin' => null,
    'show_invisibles' => null,
    'highlight_active_line' => null,
    'options_enable_basic_autocompletion' => true,
    'options_enable_live_autocompletion' => true,
    'options_enable_snippets' => false
    'keyboard_handler' => null

Above code will create textarea element that will be replaced with ace editor instance. Textarea value is updated on every single change in ace editor.


This section is optional, you dont need to configure anything and the form type will still work perfectly fine

Default configuration:

# app/config/config.yml

    base_path: "vendor/ace" # notice! this is starting from "your_project_root/web"!
    autoinclude: true
    debug: false # sources not minified, based on kernel.debug but it can force it
    noconflict: true # uses ace.require instead of require

You can also include Ace editor directly from a location that follow the same directory layout than, all you need to do is setting base_path option:

    base_path: ""