Score:0

Can't open url link or images in CKEditor on a modal form

ni flag

I have created a custom form with a text field that uses ckeditor. I open this form in a modal window. It works good, but if you try to use url link button or image button, because they are opened in a modal window too, my form disapears.
I open the form using this code:

var ajaxSettings = {
            url: '/' + path + '/' + id + '/edit',
            dialogType: 'modal',
            dialog: {classes: {"ui-dialog": "modaladd " + path}},
        };
var myAjaxObject = Drupal.ajax(ajaxSettings);
myAjaxObject.execute();

The modal form is shown but if you click on url link or image button, the form disapears.

I have to change the open function to this code:

var ajaxSettings = { url: '/' + path + '/' + id + '/edit', dialogType: 'dialog', dialog: {classes: {"ui-dialog": "modaladd " + path}}, }; var myAjaxObject = Drupal.ajax(ajaxSettings); myAjaxObject.execute();

It works and you can use url link or image button, but you can click outside the modal window, and the background page are accesible and the user can click in any area.
How could I use real modal dialog or lock background?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.