Skip to content

Commit

Permalink
Merge branch 't/9596'
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Nov 13, 2012
2 parents b64ed37 + a2efaba commit cfab36d
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions core/creators/themedui.js
Expand Up @@ -300,32 +300,20 @@ CKEDITOR.replaceClass = 'ckeditor';
var topHtml = editor.fire( 'uiSpace', { space: 'top', html: '' } ).html;
var bottomHtml = editor.fireOnce( 'uiSpace', { space: 'bottom', html: '' } ).html;

var height = editor.config.height;

// The editor height is considered only if the contents space got filled.
if ( !isNaN( height ) )
height += 'px';

var style = '';
var width = editor.config.width;

if ( !isNaN( width ) )
style += 'width:' + width + 'px;';

if ( !themedTpl ) {
themedTpl = CKEDITOR.addTemplate( 'maincontainer', '<{outerEl}' +
' id="cke_{name}"' +
' class="{id} cke cke_reset cke_chrome cke_editor_{name} cke_{langDir} ' + CKEDITOR.env.cssClass + '" ' +
' dir="{langDir}"' +
' lang="{langCode}"' +
' role="application"' +
' aria-labelledby="cke_{name}_arialbl" {style}>' +
' aria-labelledby="cke_{name}_arialbl">' +
'<span id="cke_{name}_arialbl" class="cke_voice_label">{voiceLabel}</span>' +
'<{outerEl} class="cke_inner cke_reset" role="presentation">' +
'<span id="{topId}" class="cke_top cke_reset_all"' +
' role="presentation" style="height:auto">{topHtml}</span>' +
'<{outerEl} id="{contentId}" class="cke_contents cke_reset"' +
' role="presentation" style="height:{height}"></{outerEl}>' +
' role="presentation"></{outerEl}>' +
'<span id="{bottomId}" class="cke_bottom cke_reset_all" role="presentation">{bottomHtml}</span>' +
'</{outerEl}>' +
'</{outerEl}>' );
Expand All @@ -337,8 +325,6 @@ CKEDITOR.replaceClass = 'ckeditor';
langDir: editor.lang.dir,
langCode: editor.langCode,
voiceLabel: editor.lang.editor,
style: ( style ? ' style="' + style + '"' : '' ),
height: height,
topId: editor.ui.spaceId( 'top' ),
topHtml: topHtml || '',
contentId: editor.ui.spaceId( 'contents' ),
Expand All @@ -360,6 +346,14 @@ CKEDITOR.replaceClass = 'ckeditor';
editor.ui.space( 'top' ).unselectable();
editor.ui.space( 'bottom' ).unselectable();

var width = editor.config.width, height = editor.config.height;
if ( width )
container.setStyle( 'width', CKEDITOR.tools.cssLength( width ) );

// The editor height is applied to the contents space.
if ( height )
editor.ui.space( 'contents' ).setStyle( 'height', CKEDITOR.tools.cssLength( height ) );

// Disable browser context menu for editor's chrome.
container.disableContextMenu();

Expand Down

0 comments on commit cfab36d

Please sign in to comment.