Ticket #7452: bodyId and bodyClass.patch

File bodyId and bodyClass.patch, 3.4 KB (added by Josh S., 14 years ago)

pass the editor variable to getHolderElement()

  • _source/plugins/richcombo/plugin.js

     
    224224                                panelBlockDefinition = this._.panelDefinition.block,
    225225                                panelParentElement = panelDefinition.parent || CKEDITOR.document.getBody(),
    226226                                panel = new CKEDITOR.ui.floatPanel( editor, panelParentElement, panelDefinition ),
    227                                 list = panel.addListBlock( this.id, panelBlockDefinition ),
     227                                list = panel.addListBlock( this.id, panelBlockDefinition, editor ),
    228228                                me = this;
    229229
    230230                        panel.onShow = function()
  • _source/plugins/panel/plugin.js

     
    122122                return id;
    123123        },
    124124
    125         getHolderElement : function()
     125        getHolderElement : function(editor)
    126126        {
    127127                var holder = this._.holder;
    128128
     
    144144                                                        this.onLoad();
    145145                                        }, this ) );
    146146
     147                                //get the body_id and body_class
     148                                var body_class = 'cke_' + dir + ' cke_panel_frame ' + CKEDITOR.env.cssClass;
     149                                var body_id = '';
     150                                if( editor ){
     151                                        var config = editor.config;
     152                                        body_class += ( config.bodyClass ? ' ' + config.bodyClass : '' );
     153                                        body_id = ( config.bodyId ? ' id="' + config.bodyId + '"' : '' );
     154                                }
     155
    147156                                var data =
    148157                                        '<!DOCTYPE html>' +
    149158                                        '<html dir="' + dir + '" class="' + className + '_container" lang="' + langCode + '">' +
    150159                                                '<head>' +
    151160                                                        '<style>.' + className + '_container{visibility:hidden}</style>' +
    152161                                                '</head>' +
    153                                                 '<body class="cke_' + dir + ' cke_panel_frame ' + CKEDITOR.env.cssClass + '" style="margin:0;padding:0"' +
     162                                                '<body' + body_id +
     163                                                ' class="' + body_class + '" style="margin:0;padding:0"' +
    154164                                                ' onload="( window.CKEDITOR || window.parent.CKEDITOR ).tools.callFunction(' + onLoad + ');"></body>' +
    155165                                                // It looks strange, but for FF2, the styles must go
    156166                                                // after <body>, so it (body) becames immediatelly
  • _source/plugins/listblock/plugin.js

     
    99
    1010        onLoad : function()
    1111        {
    12                 CKEDITOR.ui.panel.prototype.addListBlock = function( name, definition )
     12                CKEDITOR.ui.panel.prototype.addListBlock = function( name, definition, editor )
    1313                {
    14                         return this.addBlock( name, new CKEDITOR.ui.listBlock( this.getHolderElement(), definition ) );
     14                        return this.addBlock( name, new CKEDITOR.ui.listBlock( this.getHolderElement(editor), definition ) );
    1515                };
    1616
    1717                CKEDITOR.ui.listBlock = CKEDITOR.tools.createClass(
  • _source/plugins/floatpanel/plugin.js

     
    7272                                return this._.panel.addBlock( name, block );
    7373                        },
    7474
    75                         addListBlock : function( name, multiSelect )
     75                        addListBlock : function( name, multiSelect, editor )
    7676                        {
    77                                 return this._.panel.addListBlock( name, multiSelect );
     77                                return this._.panel.addListBlock( name, multiSelect, editor );
    7878                        },
    7979
    8080                        getBlock : function( name )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy