承接 ist1/content-editable-bundle 相关项目开发

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

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

ist1/content-editable-bundle

Composer 安装命令:

composer require ist1/content-editable-bundle

包简介

WYSIWYG editor bundle for Symfony - works well with ContentBundle

README 文档

README

Simple and flexible WYSIWYG editor bundle for Symfony - works well with Ist1ContentBundle

Install

  1. add to composer

    $ composer require ist1/content-editable-bundle
  2. update your AppKernel:

    new Ist1\ContentEditableBundle\Ist1ContentEditableBundle(),
  3. get Aloha editor (http://www.alohaeditor.org/) and install it

  4. update your config.yml with something like this:

    ist1_content_editable:
        configurations:
            # with an every day regular entity
            acme_blog:
                repository_class: AcmeSampleBundle:Blog
            # with Ist1ContentBundle
            ist1_content:
                repository_class: Ist1ContentBundle:Content
                id_field: name
                data_field: content
    

5. update your routing.yml:
    ```
    ist1_content_editable:
        resource: "@Ist1ContentEditableBundle/Controller/"
        type:     annotation
        prefix:   /admin/content-editable
    ```
6. include JS: '@Ist1ContentEditableBundle/Resources/public/js/main.js'

7. invoke init function by passing a base url somehow like this:
    ```javascript
    contentEditable.init('/' + locale + '/admin/content-editable');
    ```

8. (optional) include CSS. '@Ist1ContentEditableBundle/Resources/public/css/main.css'

### Usage


- sample twig code:

{{ blog.lead }}

```
  • sample twig code with Ist1ContentBundle:
<p {{ content_editable ('ist1_content', 'id_of_the_content') }}>{{ content ('id_of_the_content', 'initial value of the content') }}</p>
  • once you have initialised ContentEditable you'll just need to activate the Aloha editor by clicking on the element you want to edit

Appendix

  • this is a very early version, just decoupled from one of my recent projects
  • I'll improve it when a future project requires me to add more functionality
  • test coverage is coming soon
  • function signature: content_editable (configKey, objectId, dataField = null)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-06