【问题标题】:CKEditorType shows text area in symfony sonata adminCKEditorType 在 symfony sonata admin 中显示文本区域
【发布时间】:2021-10-15 16:59:27
【问题描述】:

我在我的 symfony 项目中使用friendsofsymfony/ckeditor-bundle 我按照 symfony 文档https://symfony.com/doc/current/bundles/FOSCKEditorBundle/installation.html 安装它。但问题不是让 ckeditor 我得到一个文本区域。

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'),

              ))
     }

【问题讨论】:

    标签: php symfony ckeditor sonata-admin


    【解决方案1】:

    显然,我忘记安装资产了。这应该可以解决问题。

     php app/console assets:install web
    

    【讨论】:

      猜你喜欢
      • 2013-09-20
      • 1970-01-01
      • 2018-01-27
      • 1970-01-01
      • 1970-01-01
      • 2013-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多