【发布时间】: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