CKEditorType shows text area in symfony sonata admin

Viewed 213

I'm using friendsofsymfony/ckeditor-bundle in my symfony project I followed symfony docs https://symfony.com/doc/current/bundles/FOSCKEditorBundle/installation.html to install it. But the problem instead of getting the ckeditor Im getting a text area.

enter image description here

config.yml

 form_themes:
         - '@FOSCKEditor/Form/ckeditor_widget.html.twig'

fos_ckeditor.yaml

default_config: default
configs:
default:

  default toolbar plus Format button
toolbar:
  [Bold, Italic, Underline, -, Cut, Copy, Paste,
   PasteText, PasteFromWord, -, Undo, Redo, -,
   NumberedList, BulletedList, -, Outdent, Indent, -,
   Blockquote, -, Image, Link, Unlink, Table]
  [Format, Maximize, Source]

TutoAdmin.php

protected function configureFormFields(FormMapper $formMapper)
    {
        $formMapper

              ->add('contentEn', CKEditorType::class, array(
                'label' => 'Content english',
                 'config' => array('toolbar' => 'full'),

              ))
     }
1 Answers

Apparently , I forgot to install the assets.This should solve the problem.

 php app/console assets:install web
Related