Opened 12 years ago
Closed 12 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 + ' <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)
Change History (10)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Summary: | Custom Plugin not working unless a system plugin is triggered first → Custom Iframe Plugin not working unless a system plugin is triggered first |
---|
Changed 12 years ago by
Attachment: | insertglossary.7z added |
---|
comment:3 Changed 12 years ago by
Status: | new → confirmed |
---|
To reproduce:
- Copy paste attached plugin into samples folder
- On E.g. replacebycode page add
extraPlugins : 'insertglossary'
andtoolbar : ['InsertGlossary']
- Load the page and click newly added toolbar button
Results:
- No dialog will show up, just the "dialog_background_cover". There will be no JavaScript errors thrown.
- 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.
- 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 examplehtml: '<iframe src="' + me.path +
comment:4 Changed 12 years ago by
Any progress with this ticket ? I really hope it gets fixed before the release of 4.0 !
comment:5 Changed 12 years ago by
Version: | 4.0 Beta → 4.0 (GitHub - master) |
---|
comment:6 Changed 12 years ago by
Component: | General → UI : 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 12 years ago by
Owner: | set to Garry Yao |
---|---|
Status: | confirmed → review |
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 12 years ago by
Status: | review → review_passed |
---|
Pushed t/9376@tests after rebasing on master.
comment:9 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
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.