ikimea/ckeditor-bundle

此包已被弃用且不再维护。作者建议使用egeloen/ckeditor-bundle包。

CKEditor与Symfony2集成

安装: 420

依赖: 0

建议者: 0

安全: 0

星标: 2

关注者: 1

分支: 0

开放问题: 0

类型:symfony-bundle

dev-master 2013-04-24 19:12 UTC

This package is auto-updated.

Last update: 2022-02-01 12:20:32 UTC


README

使用IvoryCKEditorBundle代替

##Ckeditor

CKEditor是一个用于Web页面的文本编辑器。它是一个所见即所得的编辑器,这意味着正在编辑的文本看起来尽可能接近用户发布时看到的结果。它带来了在桌面编辑应用程序(如Microsoft Word和OpenOffice)上常见的网络编辑功能。

功能

  • Symfony2集成

使用Symfony 2.1和Composer安装

只需将以下行添加到项目的composer.json的require部分

"ikimea/ckeditor-bundle": "dev-master"

启用模块

<?php
// app/AppKernel.php

public function registerBundles()
{
    return array(
        new Ikimea\CKEditorBundle\CKEditorBundle(),
        // ...
    );
}
$ ./app/console assets:install web --symlink

配置

只需使用给定的参数配置所需的路径数量

# app/config.yml
ikimea_ck_editor:
    lang : fr
    src : /bundles/ikimeackeditor/js/ckeditor/
    skin: moono
    toolbar:
      - ['Format']
      - ['Bold','Italic']
      - ['Outdent','Indent','Blockquote']
      - ['NumberedList','BulletedList']
      - ['-','Link','Unlink','Anchor','-','Table']
      - ['Maximize','Source']

使用

/** @var $builder FormBuilderInterface */
$builder
    ->add('content', 'ckeditor')