FOSCKEditorBundle
FOSCKEditorBundle copied to clipboard
✨(feat) Migrate to CKEditor 5 + allow back Php7.4
| Q | A |
|---|---|
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | yes |
| Deprecations? | yes |
| Fixed tickets | N/A |
| License | MIT |
Hi,
This is a full rewrite to make it working with ckeditor 5. Because I still use Symfony 5.4 and Php 7.4, I allowed to install with Php 7.4
Here is an example of configuration:
# Read the documentation: https://symfony.com/doc/current/bundles/FOSCKEditorBundle/index.html
twig:
form_themes:
- '@FOSCKEditor/Form/ckeditor_widget.html.twig'
fos_ck_editor:
default_config: classic_config
powered_by: false
configs:
balloon_config:
build: 'balloon'
toolbar: { items: ['bold', 'italic', 'bulletedList', 'link' ] }
classic_config:
build: 'classic'
minHeight: '212px'
# width: '50px'
# licenseKey: 'your-license-key',
toolbar: { items: ['undo', 'redo', '|', 'bold', 'italic', 'bulletedList', 'link' ] }
# ui: { poweredBy: { position: 'inside', side: 'right', label: '' } }
# extraPlugins: ['ResizableHeight']
# ResizableHeight: {
# resize: false,
# height: '500px',
# minHeight: '100px',
# maxHeight: '1000px'
# }
# style: {
# definitions: [
# {
# name: 'Article category',
# element: 'h3',
# classes: [ 'category' ]
# },
# {
# name: 'Info box',
# element: 'p',
# classes: [ 'info-box' ]
# },
# ]
# }
# template: {
# definitions: [
# {
# title: 'The title of the template',
# description: 'A longer description of the template',
# data: '<p>Data inserted into the content</p>'
# }
# ]
# }
styles: { '.ck.ck-editor__editable': { 'background-color': 'red' }
# plugins:
# ResizableHeight:
# path: '/bundles/ckeditor5-resizableheight/'
# filename: 'plugin.js'
Remaining tasks:
- [ ] Tests need to be changed
- [ ] Be able to download several predefined builds to be able to use different config
- [ ] Make form type working with other things than ClassicEditor. The only editor type which can be initialized on
- [ ] Make Plugins working (blockers https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-ckeditor-duplicated-modules and https://github.com/ckeditor/ckeditor5/issues/14745#issuecomment-1670822989
Related issue: #242