numaxlab / nova-ckeditor5-classic

A Laravel Nova CKEditor5 Classic Field.
MIT License
39 stars 41 forks source link

Allow MediaEmbed customization #22

Closed harmenjanssen closed 6 months ago

harmenjanssen commented 3 years ago

This enables developers to configure custom settings for the mediaEmbed section as outlined in the CKEditor MediaEmbedConfig documentation.

Example Laravel code:

// file: config/ckeditor5Classic.php

return [
    // ... rest of config
    'mediaEmbed' => [
        'extraProviders' => [
            [
                'name' => 'Example.com',
                'url' => '/^example\.com\/media\/(\w+)/',
                'html' => '<p>Example $1</p>',
            ],
        ],
        'previewsInData' => true,
    ],
];

I need some custom media providers in my project, so hopefully this can be merged into the project!

Thanks in advance, let me know if you'd like to see changes.

harmenjanssen commented 3 years ago

Hi! Is there an update on this? I need this functionality in my project and would really like to avoid using a fork.

Thanks!

yakovlef commented 3 years ago

This is a great PR, accept!