dev-master
9999999-dev https://github.com/janoist1/ContentEditableBundleWYSIWYG editor bundle for Symfony - works well with ContentBundle
MIT
The Requires
by Istvan Jano
symfony2 wysiwyg aloha
WYSIWYG editor bundle for Symfony - works well with ContentBundle
Simple and flexible WYSIWYG editor bundle for Symfony - works well with Ist1ContentBundle, (*1)
add to composer, (*2)
$ composer require ist1/content-editable-bundle
update your AppKernel:, (*3)
new Ist1\ContentEditableBundle\Ist1ContentEditableBundle(),
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)
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:
, (*6)
{{ blog.lead }}, (*7)
- sample twig code with Ist1ContentBundle:
, (*8)
{{ content ('id_of_the_content', 'initial value of the content') }}, (*9)
```WYSIWYG editor bundle for Symfony - works well with ContentBundle
MIT
symfony2 wysiwyg aloha