I have a form that has text_format form element with CKEditor in it and it has the image button in toolbar.

This form is being displayed via modal. When I click on the image the image upload/configuration is also in modal but not in a new one, instead it replaces the whole form. And also as I understand jQuery modal there can be only one at a time anyway.

How can I tell the image button to use new modal instead?

Looking at the code, the js dialog settings in drupalimage plugin.js are local, so inaccessible for overwrite, and the \Drupal\editor\Form\EditorImageDialog::submitForm returns CloseModalDialogCommand, which would close the original modal even with JS altered.

So from what I'm looking at the image cannot be used in forms that are displayed in modal at all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy