Ticket #9047: 9047.patch
File 9047.patch, 1.5 KB (added by , 12 years ago) |
---|
-
_source/plugins/preview/plugin.js
9 9 10 10 (function() 11 11 { 12 var pluginPath; 13 12 14 var previewCmd = 13 15 { 14 16 modes : { wysiwyg:1, source:1 }, … … 79 81 '})() )'; 80 82 } 81 83 84 // With Firefox only, we need to open a special preview page, so 85 // anchors will work properly on it. (#9047) 86 if ( CKEDITOR.env.gecko ) 87 { 88 window._cke_htmlToLoad = sHTML; 89 sOpenUrl = pluginPath + 'preview.html'; 90 } 91 82 92 var oWindow = window.open( sOpenUrl, null, 'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=' + 83 93 iWidth + ',height=' + iHeight + ',left=' + iLeft ); 84 94 85 if ( !isCustomDomain )95 if ( !isCustomDomain && !CKEDITOR.env.gecko ) 86 96 { 87 97 var doc = oWindow.document; 88 98 doc.open(); … … 102 112 { 103 113 init : function( editor ) 104 114 { 115 pluginPath = this.path; 116 105 117 editor.addCommand( pluginName, previewCmd ); 106 118 editor.ui.addButton( 'Preview', 107 119 { -
_source/plugins/preview/preview.html
1 <script> 2 3 var doc = document; 4 doc.open(); 5 doc.write( window.opener._cke_htmlToLoad ); 6 doc.close(); 7 8 delete window.opener._cke_htmlToLoad; 9 10 </script>