Opened 12 years ago

Closed 11 years ago

#9376 closed Bug (fixed)

Custom Iframe Plugin not working unless a system plugin is triggered first

Reported by: yveszx Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 4.0
Component: UI : Dialogs Version: 4.0
Keywords: Cc:

Description

I was able to replicate this with 3 different custom plugins with on chrome and IE9. If i don't click on image plugin or table plugin, when i try to trigger my custom plugin it will freeze after the overlay is loaded. nothing in the console

my plugins are very simple simple iframe plugin, ...

(function () {
    CKEDITOR.plugins.add('InsertGlossary',
    {
        requires: ['iframedialog'],
        init: function (editor) {
            var me = this;

            CKEDITOR.dialog.add('InsertGlossaryDialog', function (targetEditor) {
                return {
                    title: 'InsertGlossary Dialog',
                    minWidth: 595,
                    minHeight: 500,
                    contents:
                       [
                       {
                           id: 'iframeGloss',
                           label: 'InsertGlossary',
                           expand: true,
                           elements:
                        [
                            {
                                type: 'html',
                                id: 'Glossary',
                                label: 'Glossary',
                                style: 'width : 100%;',
                                html: '<iframe src="' + me.path + 'dialogs/GlossaryIFRAME.aspx" frameborder="0" name="MyGlossary_' + targetEditor.name + '" id="MyGlossary" allowtransparency="1" style="width:100%;height:490px;margin:0;padding:0;"></iframe>'
                            }
                        ]
                       }
                       ],
                    onOk: function () {
                         
                        final_html = '<a class="glossary"  href="glossary.aspx?search=' + encodeURIComponent(content) + '" target="_blank">' + content + '&nbsp;<img border="0" src="/images/controls/info.png" width="20" /></a>';
                        editor.focus();
                        editor.insertHtml(final_html);
                    }
                };


            });

            editor.addCommand('InsertGlossary', new CKEDITOR.dialogCommand('InsertGlossaryDialog'));

            editor.ui.addButton('InsertGlossary',
            {
                label: 'InsertGlossary',
                command: 'InsertGlossary',
                icon: this.path + 'images/icon.gif'
            });
        }
    });
})();


Attachments (1)

insertglossary.7z (2.1 KB) - added by Jakub Ś 12 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 12 years ago by yveszx

to clarify the problem, none of the custom plugin work unless a system dialog is opened first.

Any none-user created "CkEditor" plugin will work (ie:replace, special char) any plugin triggered before my user created plugin will fix the problem.

if a System plugin is not triggered first, the overlay will show but the dialog window will not open.

comment:2 Changed 12 years ago by Jakub Ś

Summary: Custom Plugin not working unless a system plugin is triggered firstCustom Iframe Plugin not working unless a system plugin is triggered first

Changed 12 years ago by Jakub Ś

Attachment: insertglossary.7z added

comment:3 Changed 12 years ago by Jakub Ś

Status: newconfirmed

To reproduce:

  1. Copy paste attached plugin into samples folder
  2. On E.g. replacebycode page add extraPlugins : 'insertglossary' and toolbar : ['InsertGlossary']
  3. Load the page and click newly added toolbar button

Results:

  1. No dialog will show up, just the "dialog_background_cover". There will be no JavaScript errors thrown.
  2. If you open any non ifrme dialog plugin (even new custom one) and then open this plugin everything will be working fine. Seems that iframe dialog plugin is not able to load/init dialog code.
  3. Please note that this is true only for iframe dialog plugins and it does not matter whether you add iframe with CKEDITOR.dialog.addIframe(... or like in this example html: '<iframe src="' + me.path +

comment:4 Changed 12 years ago by yveszx

Any progress with this ticket ? I really hope it gets fixed before the release of 4.0 !

comment:5 Changed 12 years ago by yveszx

Version: 4.0 Beta4.0 (GitHub - master)

comment:6 Changed 11 years ago by Frederico Caldeira Knabben

Component: GeneralUI : Dialogs
Milestone: CKEditor 4.0

If confirmed to be a regression, we should try to have it fixed for the 4.0.

comment:7 Changed 11 years ago by Garry Yao

Owner: set to Garry Yao
Status: confirmedreview

Opened t/9376 on both dev and tests, it fixes the missing dialog skin file to be loaded, when dialog definition is locally available.

comment:8 Changed 11 years ago by Piotrek Koszuliński

Status: reviewreview_passed

Pushed t/9376@tests after rebasing on master.

comment:9 Changed 11 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy