我实际上正在开发一个需要使用 Symfony 4.4 和 EasyAdmin 3 的 WYSIWYG 界面的项目。
我尝试按照此文档https://symfony.com/doc/2.x/bundles/EasyAdminBundle/integration/ivoryckeditorbundle.html以及我在 Google 或 Youtube 上找到的其他一些教程来安装 FOS_CKEditor ,但不幸的是我不明白为什么 CKEditorField 没有显示在我的管理仪表板上。我想我已经错过了一些东西。
一些帮助将不胜感激,这是我的配置文件:
Fos_ckeditor:
#config/packages/fos_ckeditor.yaml
twig:
form_themes:
- '@FOSCKEditor/Form/ckeditor_widget.html.twig'
fos_ck_editor:
configs:
basic_conf:
toolbar: full
Run Code Online (Sandbox Code Playgroud)
易管理员:
#config/packages/easy_admin.yaml
easy_admin:
design:
form_theme:
- "@EasyAdmin/form/bootstrap_4.html.twig"
- "@FOSCKEditor/Form/ckeditor_widget.html.twig"
Run Code Online (Sandbox Code Playgroud)
我还尝试通过添加以下内容来定义 CrudController 中的 FieldType:
#CrudController
public function configureFields(string $pageName): iterable
{
return [
..//
TextareaField::new('corps', 'Corps')
->setFormType(CKEditorType::class),
Run Code Online (Sandbox Code Playgroud)
但它没有奏效。
预先感谢您的帮助!