我已经安装了CreateBundle并且已经运行了BlockBundle。纯文本编辑器工作正常,但我很难让ckeditor运行。
这是我为CreateBundle配置的:
cmf_create:
auto_mapping: true
editor_base_path: /bundles/cmfcreate/vendor/ckeditor/
fixed_toolbar: true
这是我正在呈现的模板:
{% include "CmfCreateBundle::includecssfiles.html.twig" %}
{{ locale_switcher() }}
{{ sonata_block_render({
'name': '/' ~ app.request.locale ~ '/TestBlockDE1'
}) }}
{% render(controller(
"cmf_create.jsloader.controller:includeJSFilesAction",
{"editor": "ckeditor", "_locale": app.request.locale }
)) %}
TestBlockDE1
是SimpleBlock的名称,其中schema:headline
应为plain_text可编辑(有效),schema:text
可通过CKEditor编辑,如沙盒示例中所示。
这是我的composer.json文件:
{
"name" : "symfony/framework-standard-edition",
"description" : "The \"Symfony Standard Edition\" distribution",
"type" : "project",
"keywords" : [],
"license" : [
"MIT"
],
"require" : {
"doctrine/doctrine-fixtures-bundle" : "dev-master",
"jackalope/jackalope-doctrine-dbal" : "dev-master",
"friendsofsymfony/user-bundle" : "*",
"symfony/swiftmailer-bundle" : "2.3.*",
"sonata-project/cache-bundle" : "dev-master",
"doctrine/orm" : ">=2.2.3,<2.4-dev",
"sonata-project/user-bundle" : "dev-master",
"friendsofsymfony/rest-bundle" : "1.0.*@dev",
"symfony-cmf/create-bundle" : "1.0.*@dev",
"lunetics/locale-bundle" : "dev-master",
"twig/extensions" : "1.0.*",
"php" : ">=5.3.3",
"symfony-cmf/symfony-cmf" : "dev-master",
"symfony/monolog-bundle" : "2.3.*",
"symfony-cmf/media-bundle" : "1.0.*@dev",
"sensio/distribution-bundle" : "2.3.*",
"symfony/symfony" : "2.3.*",
"doctrine/phpcr-bundle" : "1.0.0",
"sonata-project/doctrine-orm-admin-bundle" : "2.*",
"sonata-project/easy-extends-bundle" : "dev-master",
"doctrine/phpcr-odm" : "1.0.0",
"symfony/assetic-bundle" : "2.3.*",
"incenteev/composer-parameter-handler" : "~2.0",
"sonata-project/doctrine-phpcr-admin-bundle" : "dev-master",
"sonata-project/intl-bundle" : "dev-master",
"sensio/generator-bundle" : "2.3.*",
"sensio/framework-extra-bundle" : "2.3.*",
"doctrine/doctrine-bundle" : "1.2.*"
},
"autoload" : {
"psr-0" : {
"" : "src/"
}
},
"minimum-stability" : "dev",
"config" : {
"bin-dir" : "bin"
},
"scripts" : {
"post-update-cmd" : [
"Symfony\\Cmf\\Bundle\\CreateBundle\\Composer\\ScriptHandler::downloadCreateAndCkeditor",
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-install-cmd" : [
"Symfony\\Cmf\\Bundle\\CreateBundle\\Composer\\ScriptHandler::downloadCreateAndCkeditor",
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"extra" : {
"branch-alias" : {
"dev-master" : "2.3-dev"
},
"symfony-web-dir" : "web",
"symfony-app-dir" : "app",
"incenteev-parameters" : {
"file" : "app/config/parameters.yml"
}
}
}
有什么建议可能会出错?