I just noticed that my CKEditor does not work anymore. It had been a few days since I had not been to the page that uses CKEditor on my site. But the facts are there. I only have a simple Textaera instead of the CKEditor tool.
Is there a way to see where the problem comes from?
My AppKernel.php:
$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 Site\PagesBundle\PagesBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new Vich\UploaderBundle\VichUploaderBundle(),
new FOS\UserBundle\FOSUserBundle(),
new FOS\CKEditorBundle\FOSCKEditorBundle(),
new Besancon\AuthBundle\BesanconAuthBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
];
A part of my config.yml:
fos_ck_editor:
configs:
my_config:
toolbar: [ ["Source", "-", "Save"], "/", ["Anchor"], "/", ["Maximize"] ]
uiColor: "#000000"
The formType :
<?php
namespace Site\PagesBundle\Form;
use Symfony\Component\Form\AbstractType;
use FOS\CKEditorBundle\Form\Type\CKEditorType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\RangeType;
class InformationType extends AbstractType
{
/**
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('titre',TextType::class,array(
'attr' => array(
'placeholder'=> 'Titre de l\'information',
'class'=>'form-control'
)
))
->add('contenu', CKEditorType::class, array(
'config' => array(
'uiColor' => '#ffffff',
'toolbar'=>'full'
),))
->add('zone',ChoiceType::class, array(
'choices'=> array(
'Zone 1'=>'Zone 1',
'Zone 2'=>'Zone 2',
'Zone 3'=>'Zone 3',
),
))
->add('criticite', RangeType::class, array(
'label'=> 'Taux de criticité',
'attr'=>array(
'list'=> 'tauxCriticite'
)
))
;
}
And the twig file :
{% extends 'base.html.twig' %}
{% block body %}
<h1>Information creation</h1>
{{ form_start(form) }}
{{form_row (form.titre)}}
{{form_row (form.zone)}}
{{form_row (form.contenu)}}
{{form_row (form.criticite)}}
<datalist id="tauxCriticite">
<option value="0" label="0%">
<option value="10">
<option value="20">
<option value="30">
<option value="40">
<option label="50" value="50">
<option value="60">
<option value="70">
<option value="80">
<option value="90">
<option value="100" label="100%">
</datalist>
<input class="btn btn-primary" type="submit" value="Ajouter"/>
<a href="{{path('informations_index')}}" class="btn btn-primary">Retour</a>
{{ form_end(form) }}
{% endblock %}
So, we agree that it's not a configuration problem ?
EDIT : I also add the fact that I have the ckeditor bundle in my bundle, and that I also have the ckeditor folder in the "web" folder