Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot paste base64 if filebrowserUploadHandler is set #241

Open
chrisooo3 opened this issue Apr 6, 2022 · 0 comments
Open

Cannot paste base64 if filebrowserUploadHandler is set #241

chrisooo3 opened this issue Apr 6, 2022 · 0 comments

Comments

@chrisooo3
Copy link

chrisooo3 commented Apr 6, 2022

My simple form looks like this:

final class ContentType extends AbstractType
{
    private RouterInterface $router;

    public function buildForm(FormBuilderInterface $builder, array $options): void
    {
        $builder->add('content', CKEditorType::class, [
            'label' => 'Treść',
            'constraints' => [new NotBlank()],
            'config' => [
                'filebrowserUploadHandler' => $this->router->generate('upload')
            ]
        ]);
    }
}

If I want to paste svg image in base64 format, I am getting the following error in dev tool:

Uncaught TypeError: Cannot read property '1' of null

If I remove filebrowserUploadHandler parameter from my ContentType everything works fine, the base64 image is pasted normally.

Does anyone have any idea what happens?

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

No branches or pull requests

1 participant