Add fields to dialog

Last post 10-14-2007, 6:44 AM by J-roen. 1 replies.
Sort Posts: Previous Next
  •  10-12-2007, 7:45 AM 34242

    Add fields to dialog

    Hi,

    I want to add some fields to the Insert Image dialog, like the attribute "title". Because it is not possible to edit the JavaScript-code -which is very annoying by the way, because customization is very limited this way-, I decided to write it myself. I replaced InsertImage.php with my own version which contains a form and some JavaScript-code. To insert the image, I use this:

    var editor = window.opener.document.getElementById('CE_editor1_ID');
    var html = '<img ...';
    editor.PasteHTML(html);

    This works great in Firefox, but unfortunately doesn't work at all in Internet Explorer (error: window.opener not defined). I tried the example for custom buttons with dialogs (http://phphtmledit.com/custombuttons-popup.php) but it seems that the code in My_Custom_Text.html (Window_GetDialogArguments) doesn't work with CuteEditor predefined buttons.

    How can I get a pointer to the editor in this dialog in Internet Explorer?

    I also wonder why your live chat support isn't available. I paid for your support but the live support is always offline.

    Regards,
    Jeroen

  •  10-14-2007, 6:44 AM 34271 in reply to 34242

    Re: Add fields to dialog

    I figured it out. You have to load Scripts/Dialog/DialogHead.js and then use the following to get the editor:

    if(!window.dialogArguments) {
        window.dialogArguments = Window_GetDialogArguments(window);
    }
    var editor = window.dialogArguments.editor;

View as RSS news feed in XML