Developed with love by KnpLabs Hire us for your project!
22

RedactorBundle

by boonkerz

Integrate http://imperavi.com/redactor/ as formfield

Build Status

Installation

contributors: Bartłomiej Noszka bnlab

To instal this bundle, copy and paste to your composer.json

"friendsofsymfony/jsrouting-bundle": "dev-master",
"tp/redactor-bundle": "dev-master",

Rember to configure JsRoutingBundle guiding their README file.

Usage

in config.yml:

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

in routing.yml:

tp_redactor:
    resource: "@TPRedactorBundle/Controller/"
    type:     annotation

add CSS and Javascript to your assetic:

  • CSS: '@TPRedactorBundle/Resources/public/css/redactor.css'
  • Javascripts: '@TPRedactorBundle/Resources/public/js/redactor.js' and '@TPRedactorBundle/Resources/public/js/tp_redactor.js'

Configuration

RedactorBundle allows you to configure the RedactorJS editor. Options are managed by "config_sets".

in config.yml
```yaml

tp_redactor:
default_config_set: default
config_sets:
default:
lang: fr
basic:
lang: fr
formattingTags:
- 'h2'
- 'h3'
- 'p'
- 'blockquote'
```

Chose your config set at form building :

    $builder->add('your_form_field', 'redactor', array('config_set' => 'basic'));

All supported redactor options can be found Here

tp_redactor:

# The default config set. Must be defined in "config_sets"
default_config_set: default

# Redactor config sets given to JavaScript
config_sets:

# Prototype
name: []

# Default data transformers for the submitted html.
transformers: Array
  • Merge pull request #10 from alex-pex/master
    By boonkerz, 3 years ago
  • Fix Symfony <2.4 compatibility
    By alex-pex, 3 years ago
  • Update composer.json
    By boonkerz, 4 years ago
  • Update composer.json
    By boonkerz, 4 years ago
  • Merge pull request #8 from karser/master
    By boonkerz, 4 years ago
  • workaround
    By karser, 4 years ago
  • allow symfony 2.4
    By karser, 4 years ago
  • Merge pull request #7 from benscholler/master
    By boonkerz, 4 years ago
  • Wrapping redactor in document.ready.
    By benscholler, 4 years ago
  • Merge pull request #6 from loonkwil/master
    By boonkerz, 4 years ago
  • Updating requirements
    By , 4 years ago
  • Status Image Travis Ci
    By boonkerz, 5 years ago
  • Merge pull request #4 from yohang/make-configurable
    By boonkerz, 5 years ago
  • Added some tests
    By yohang, 5 years ago
  • Cleaned some files
    By yohang, 5 years ago
  • Fixed Readme
    By yohang, 5 years ago
  • Updated README
    By yohang, 5 years ago
  • Made editor configurable
    By yohang, 5 years ago
  • Merge pull request #3 from yohang/fix-cs
    By boonkerz, 5 years ago
  • Fixed some CS and typos
    By yohang, 5 years ago
  • Merge pull request #2 from yohang/master
    By boonkerz, 5 years ago
  • Updated README according to last update
    By yohang, 5 years ago
  • Removed jQuery & Redactor dependencies in HTML Body
    By yohang, 5 years ago
  • Merge from bnlab, thx for your work
    By boonkerz, 5 years ago
  • Merge from bnlab, thx for your work
    By boonkerz, 5 years ago
  • Merge from bnlab, thx for your work
    By boonkerz, 5 years ago
  • Removing shortcuts.
    By , 5 years ago
  • Fix routes name to use with JMSRoutingBundle. Added installations instructions.
    By bnlab, 5 years ago
  • PHPStorm . Files deleted
    By boonkerz, 5 years ago
  • Css Anpassungen && Readme
    By boonkerz, 5 years ago