Skip to content
Permalink
Browse files

Deuglified toolbar creation - now only first fired uiSpace will gener…

…ate toolbar.
  • Loading branch information...
Reinmar committed Jan 29, 2013
1 parent f82844b commit fe21f84cab3131824ffd7b7c408d596523bdc38f
Showing with 8 additions and 3 deletions.
  1. +1 −1 core/creators/themedui.js
  2. +4 −2 plugins/floatingspace/plugin.js
  3. +3 −0 plugins/toolbar/plugin.js
@@ -302,7 +302,7 @@ CKEDITOR.replaceClass = 'ckeditor';

// Get the HTML for the predefined spaces.
var topHtml = editor.fire( 'uiSpace', { space: 'top', html: '' } ).html;
var bottomHtml = editor.fireOnce( 'uiSpace', { space: 'bottom', html: '' } ).html;
var bottomHtml = editor.fire( 'uiSpace', { space: 'bottom', html: '' } ).html;

if ( !themedTpl ) {
themedTpl = CKEDITOR.addTemplate( 'maincontainer', '<{outerEl}' +
@@ -20,9 +20,11 @@

CKEDITOR.plugins.add( 'floatingspace', {
init: function( editor ) {
editor.on( 'contentDom', function() {
// Add listener with lower priority than that in themedui creator.
// Thereby floatingspace will be created only if themedui wasn't used.
editor.on( 'loaded', function() {
attach( editor );
});
}, null, null, 20 );
}
});

@@ -149,6 +149,9 @@

editor.on( 'uiSpace', function( event ) {
if ( event.data.space == editor.config.toolbarLocation ) {
// Create toolbar only once.
event.removeListener();

editor.toolbox = new toolbox();

var labelId = CKEDITOR.tools.getNextId();

0 comments on commit fe21f84

Please sign in to comment.
You can’t perform that action at this time.