Skip to content

✨(feat) Migrate to CKEditor 5 for php8#272

Open
floviolleau wants to merge 7 commits intoFriendsOfSymfony:2.xfrom
floviolleau:feature/ckeditor-5-php-8
Open

✨(feat) Migrate to CKEditor 5 for php8#272
floviolleau wants to merge 7 commits intoFriendsOfSymfony:2.xfrom
floviolleau:feature/ckeditor-5-php-8

Conversation

@floviolleau
Copy link
Copy Markdown

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.

I moved to php8.4 so I made this PR to make it working

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant