1. Go to this page and download the library: Download kraksoft/redactor-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kraksoft / redactor-bundle example snippets
public function registerBundles()
{
$bundles = array(
// ...
new Stp\RedactorBundle\StpRedactorBundle(),
);
}
//BlogPostType.php
namespace Stp\BlogBundle\Form;
use Symfony\Component\Form\FormBuilderInterface,
Symfony\Component\Form\AbstractType;
class BlogPostType extends AbstractType
{
/**
* @param \Symfony\Component\Form\FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
parent::buildForm($builder, $options);
$builder->add('description', 'redactor', array('redactor' => 'blog'));
}
}