#51 implement HOOK_ckeditor5_entity_browser_definitions_alter #52
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thefile_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.