You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm in trouble : i did all the steps to install CKEditor in my Symfony3 application, and I have one error message about variable "enable" in vendor/egeloen/ckeditor-bundle/Resources/views/Form/ckeditor_widget.html.twig (line 4).
Here's my kernel :
public function registerBundles()
{
$bundles = [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new AppBundle\AppBundle(),
new FOS\UserBundle\FOSUserBundle(),
new EasyCorp\Bundle\EasyAdminBundle\EasyAdminBundle(),
new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
new Ivory\CKEditorBundle\IvoryCKEditorBundle(),
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
if ('dev' === $this->getEnvironment()) {
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
}
}
return $bundles;
}
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\OptionsResolver\OptionsResolver;
class CkeditorType extends AbstractType
{
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'attr' => array('class' => 'ckeditor')
));
}
public function getParent()
{
return TextareaType::class;
}
}
So please what's wrong?
The text was updated successfully, but these errors were encountered:
Hi Guys!
I'm in trouble : i did all the steps to install CKEditor in my Symfony3 application, and I have one error message about variable "enable" in vendor/egeloen/ckeditor-bundle/Resources/views/Form/ckeditor_widget.html.twig (line 4).
Here's my kernel :
public function registerBundles()
{
$bundles = [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new AppBundle\AppBundle(),
new FOS\UserBundle\FOSUserBundle(),
new EasyCorp\Bundle\EasyAdminBundle\EasyAdminBundle(),
new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
new Ivory\CKEditorBundle\IvoryCKEditorBundle(),
];
My formType:
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name', TextType::class, [
'label' => false,
])
->add('description', CkeditorType::class, [
'label' => false,
])
->add('categories', EntityType::class, array(
'class' => 'AppBundle:Category',
'choice_label' => 'name',
'label' => 'Choose your file',
'expanded' => false,
'multiple' => true,
))
->add('file', FileType::class, [
'label' => false,
]);
view content :
CkeditorType content :
namespace AppBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\OptionsResolver\OptionsResolver;
class CkeditorType extends AbstractType
{
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'attr' => array('class' => 'ckeditor')
));
}
public function getParent()
{
return TextareaType::class;
}
}
So please what's wrong?
The text was updated successfully, but these errors were encountered: