tp / redactor-bundle
Redactor Form Type
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 11 393
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 8
Open Issues: 1
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 not auto-updated.
Last update: 2023-05-20 20:51:29 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