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

ckeditor5_entity_browser opens different dialog #51

Closed
RobinHoutevelts opened this issue May 6, 2024 · 1 comment
Closed

ckeditor5_entity_browser opens different dialog #51

RobinHoutevelts opened this issue May 6, 2024 · 1 comment
Assignees

Comments

@RobinHoutevelts
Copy link
Contributor

RobinHoutevelts commented May 6, 2024

Description

In #49 we've decided to no longer maintain a custom ckeditor javascript plugin.
Instead we rely on drupal/ckeditor5_entity_browser to show the file entity browser dialog modal.

drupal/ckeditor5_entity_browser opens a dialog by calling /entity-browser/modal/file_editor.
That route doesn't exist because our file_editor entity browser is configured to be an iframe, not a modal.
That's being fixed upstream in #3445512, but that's still a problem for us.

We have a custom wmmedia.file.browser.editor route intended to be called by the ckeditor dialog.
This route isn't being used at all anymore and is causing issues.

For example, the "Upload" tab isn't being rendered anymore.
And when you search, you're being sent to a different web page because the modal isn't rendering an iframe.

Steps to reproduce

Configure ckeditor5_entity_browser to show the file_editor entity browser.
Add a file link by triggering the entity browser modal, and search for a string.
You'll notice you're leaving the ckeditor context.

Video
Edit.Text.from.T.Test.page.UZ.Leuven.-.6.May.2024.mp4

Expected result

Our wmmedia.file.browser.editor route should be rendered.
It attaches the correct libraries to use the entity browser in a modal.

RobinHoutevelts added a commit that referenced this issue May 6, 2024
To alter the dialog that's opened by ckeditor5_entity_browser.
It will now open our wmmedia.file.browser.editor route.
@RobinHoutevelts RobinHoutevelts self-assigned this May 6, 2024
RobinHoutevelts added a commit that referenced this issue May 13, 2024
* #51 implement HOOK_ckeditor5_entity_browser_definitions_alter

To alter the dialog that's opened by ckeditor5_entity_browser.
It will now open our wmmedia.file.browser.editor route.

* Add drupal/ckeditor5_entity_browser as suggestion
@RobinHoutevelts
Copy link
Contributor Author

Fixed in #52

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