我正在尝试将 SonataNewsBundle 集成到 Symfony 4.4 中。CKEditor未显示在新闻帖子的“内容”字段中。我已经阅读了可能在网上找到的所有内容,但找不到解决此问题的方法。fos_ck_editor.yaml:editor: base_path: "bundles/fosckeditor" js_path: "bundles/fosckeditor/ckeditor.js" input_sync: true default_config: base_config configs: base_config: toolbar: fulltwig: form_themes: - '@FOSCKEditor/Form/ckeditor_widget.html.twig'sonata_admin.yaml:sonata_admin: title: 'Something...' dashboard: blocks: - { type: sonata.admin.block.admin_list, position: left } options: legacy_twig_text_extension: false security: handler: sonata.admin.security.handler.role # DEPRECATED: override templates to enable CKEditor templates: edit: Admin/CRUD/edit.html.twig # extra CSS/JS to for SonataFormatter assets: extra_javascripts: - bundles/fosckeditor/ckeditor.js - bundles/sonataformatter/vendor/markitup-markitup/markitup/jquery.markitup.js - bundles/sonataformatter/markitup/sets/markdown/set.js - bundles/sonataformatter/markitup/sets/html/set.js - bundles/sonataformatter/markitup/sets/textile/set.js extra_stylesheets: - bundles/sonataformatter/markitup/skins/sonata/style.css - bundles/sonataformatter/markitup/sets/markdown/style.css - bundles/sonataformatter/markitup/sets/html/style.css - bundles/sonataformatter/markitup/sets/textile/style.css# General block configurationsonata_block: blocks: # Enable the SonataAdminBundle block sonata.admin.block.admin_list: contexts: [admin] # Enable SonataFormatter block sonata.formatter.block.formatter: ~
1 回答
白板的微信
TA贡献1883条经验 获得超3个赞
不管你信不信,但唯一缺少的是:
twig: form_themes: - 'SonataFormatterBundle:Form:formatter.html.twig'
在sonata_formatter.yaml
Symfony 4.4 的官方文档应该更新!
- 1 回答
- 0 关注
- 70 浏览
添加回答
举报
0/150
提交
取消