承接 zenside/ckeditor-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zenside/ckeditor-bundle

Composer 安装命令:

composer require zenside/ckeditor-bundle

包简介

Replace textarea with CKeditor. Come configured with working Image Upload & Media Embed support.

README 文档

README

Replace textarea with CKeditor.

Come configured with working Image Upload & Media Embed support

1.Add Bundle to AppKernel

public function registerBundles()
{
    $bundles = array(
        ...
        new ZenSide\CKEditorBundle\ZenSideCKEditorBundle(),
    )
}

2.Add route to routing.yml

zenside_ckeditor:
    resource: "@ZenSideCKEditorBundle/Resources/config/routing.yml"

3.Add initialisation to your layout

{% include 'ZenSideCKEditorBundle::ckeditor_init.html.twig' %}

4.Change selector used (optional)

By default all textarea will be replaced. To filter it you can pass a css selector to the include call :

{% include 'ZenSideCKEditorBundle::ckeditor_init.html.twig' with {'selector':'textarea.ckeditor'} %}

  1. Change Stylesheet applied inside editor (optional)

You can overwrite the default styles of the ckeditor by giving your own stylesheet asset path to the init file

{% include 'ZenSideCKEditorBundle::ckeditor_init.html.twig' with {'contentsCss':'bundles/mybundlename/css/myStyleFile.css'} %}

4.File Upload configuration (optional)

By default, files uploaded are moved into /web/uploads/cke. You can change this with parameter ckeditor.upload_dir in parameters.yml. Note that this folder will be relative to /web folder (had to be visible from browser to be included in CKEditor visualisation).

// parameters.yml
parameters:
    ...
    ckeditor.upload_dir = "/myuploaddir"

5.Change CKEditor configuration (optional)

You can import (after previous include) your own config.js file to overide default bundle configuration

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: HTML

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2015-09-16