我尝试在symfony3中使用ckeditor,我成功安装了它,但按照教程中的说明尝试以表格形式向我们提供时出现错误(https://symfony.com/doc/current/bundles/IvoryCKEditorBundle/index.html) :
$builder->add('content', CKEditorType::class);
但这会产生此错误:
类型错误:传递给Ivory \ CKEditorBundle \ Form \ Type \ CKEditorType :: __ construct()的参数1必须是Ivory \ CKEditorBundle \ Model \ ConfigManagerInterface的实例,未给出任何实例
看起来有一个问题,因为FormType不应在其构造函数中要求参数,我错了吗?
我遇到了同样的错误,并通过将CKEditorBundle添加到AppKernel来解决了该错误。CountZero的回答评论中对此进行了说明。您可以在此处找到IvoryCKEditorBundle安装说明。
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Ivory\CKEditorBundle\IvoryCKEditorBundle(),
// ...
);
// ...
}
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句