karser / tp-redactor-bundle
Redactor Form Type
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Language:JavaScript
Type:symfony-bundle
Requires
- php: >=5.3.2
- friendsofsymfony/jsrouting-bundle: *
- sensio/framework-extra-bundle: >=2.1,<2.3
- symfony/form: >=2.1,<2.3
- symfony/framework-bundle: >=2.1,<2.3
- symfony/twig-bundle: >=2.1,<2.3
- symfony/yaml: >=2.1,<2.3
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is auto-updated.
Last update: 2024-11-20 06:59:10 UTC
README
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
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