Index: /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2602)
+++ /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2603)
@@ -458,5 +458,5 @@
 						className : 'cke_dialog_page_contents',
 						children : contents.elements,
-						totalHeight : '100%'
+						expand : true
 					}, pageHtml );
 
@@ -1430,6 +1430,6 @@
 				var html = [ '<table cellspacing="0" border="0" ' ];
 				html.push( 'style="' );
-				if ( elementDefinition.totalHeight )
-					html.push( 'height:' + fixLength( elementDefinition.totalHeight ), ';' );
+				if ( elementDefinition.expand )
+					html.push( 'height:100%;' );
 				html.push( 'width:' + fixLength( elementDefinition.width || '100%' ), ';' );
 				html.push( '"' );
@@ -1444,4 +1444,6 @@
 					if ( heights )
 						styles.push( 'height:' + fixLength( heights[i] ) );
+					else if ( elementDefinition.expand )
+						styles.push( 'height:' + Math.floor( 100 / childHtmlList.length ) + '%' );
 					if ( styles.length > 0 )
 						html.push( 'style="', styles.join( '; ' ), '" ' );
Index: /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2602)
+++ /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2603)
@@ -350,11 +350,34 @@
 			 * @constructor
 			 */
-			html : function( dialog, elementDefinition, htmlList )
-			{
-				if ( arguments.length < 3 )
-					return;
-
-				CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'span', null, null, elementDefinition.html );
-			}
+			html : (function()
+			{
+				var myHtmlRe = /^\s*<[\w:]+\s+([^>]*)?>/,
+					theirHtmlRe = /^(\s*<[\w:]+\s+(?:[^>]*)?)((?:.|\r|\n)+)$/,
+					emptyTagRe = /\/$/;
+				return function( dialog, elementDefinition, htmlList )
+				{
+					if ( arguments.length < 3 )
+						return;
+
+					var myHtmlList = [],
+						myHtml,
+						theirHtml = elementDefinition.html,
+						myMatch, theirMatch;
+					CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, myHtmlList, 'span', null, null, '' );
+
+					// Append the attributes created by the uiElement call to the real HTML.
+					myHtml = myHtmlList.join( '' );
+					myMatch = myHtml.match( myHtmlRe );
+					theirMatch = theirHtml.match( theirHtmlRe ) || [ '', '', '' ];
+
+					if ( emptyTagRe.test( theirMatch[1] ) )
+					{
+						theirMatch[1] = theirMatch[1].slice( 0, -1 );
+						theirMatch[2] = '/' + theirMatch[2];
+					}
+
+					htmlList.push( [ theirMatch[1], myMatch[1] || '', theirMatch[2] ].join( '' ) );
+				}
+			})()
 		}, true );
 
