Index: /CKEditor/branches/prototype/_source/core/config.js
===================================================================
--- /CKEditor/branches/prototype/_source/core/config.js	(revision 2463)
+++ /CKEditor/branches/prototype/_source/core/config.js	(revision 2464)
@@ -159,5 +159,5 @@
 	 * config.plugins = 'elementspath,toolbar,wysiwygarea';
 	 */
-	plugins : 'basicstyles,button,dialog,elementspath,htmldataprocessor,keystrokes,sourcearea,tab,toolbar,wysiwygarea',
+	plugins : 'basicstyles,button,dialog,dialogui,elementspath,htmldataprocessor,keystrokes,sourcearea,tab,toolbar,wysiwygarea',
 
 	/**
Index: /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2463)
+++ /CKEditor/branches/prototype/_source/plugins/dialog/plugin.js	(revision 2464)
@@ -194,5 +194,5 @@
 	addPage : function( contents, index )
 	{
-		var pageHtml = [ '<div class="cke_dialog_page_contents">' ],
+		var pageHtml = [],
 			page,
 			tab,
@@ -202,7 +202,7 @@
 				{
 					type : 'vbox',
+					className : 'cke_dialog_page_contents',
 					children : contents.elements
 				}, pageHtml );
-		pageHtml.push( '</div>' );
 
 		page = CKEDITOR.dom.element.createFromHtml( pageHtml.join( '' ) );
@@ -303,6 +303,22 @@
 						elements : [
 							{
-								type : 'hbox',
-								children : []
+								type : 'text',
+								title: 'Test Text 1',
+								id: 'testText',
+								default: 'hello world!'
+							},
+
+							{
+								type : 'text',
+								title: 'Test Text 2',
+								id: 'testText',
+								default: 'Wheee'
+							},
+
+							{
+								type : 'text',
+								title: 'Test Text 3',
+								id: 'testText',
+								default: 'Blah blah'
 							}
 						]
@@ -352,5 +368,5 @@
 			styles = ( stylesArg && stylesArg.call ? stylesArg( elementDefinition ) : stylesArg ) || {},
 			attributes = ( attributesArg && attributesArg.call ? attributesArg( elementDefinition ) : attributesArg ) || {},
-			innerHTML = ( contentsArg && contentsArg.call ? contentsArg( elementDefinition ) : contentsArg ) || '';
+			innerHTML = ( contentsArg && contentsArg.call ? contentsArg( dialog, elementDefinition ) : contentsArg ) || '';
 
 		// Set the id.
@@ -395,5 +411,5 @@
 	},
 
-	hbox : function( dialog, elementDefinition, htmlList, stylesArg, attributesArg )
+	hbox : function( dialog, elementDefinition, htmlList )
 	{
 		if (arguments.length < 3 )
@@ -403,5 +419,5 @@
 			this._ = {};
 		var children = this._.children = [];
-		var innerHTML = function( innerDefinition )
+		var innerHTML = function( dialog, innerDefinition )
 		{
 			var html = [];
@@ -421,8 +437,8 @@
 			return html.join( '' );
 		}
-		CKEDITOR.ui.dialog.uiElement.call(this, dialog, elementDefinition, htmlList, 'div', stylesArg, attributesArg, innerHTML );
-	},
-
-	vbox : function( dialog, elementDefinition, htmlList, stylesArg, attributesArg )
+		CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'div', null, null, innerHTML );
+	},
+
+	vbox : function( dialog, elementDefinition, htmlList )
 	{
 		if (arguments.length < 3 )
@@ -432,5 +448,5 @@
 			this._ = {};
 		var children = this._.children = [];
-		var innerHTML = function( innerDefinition )
+		var innerHTML = function( dialog, innerDefinition )
 		{
 			var html = [];
@@ -453,5 +469,5 @@
 			return html.join( '' );
 		}
-		CKEDITOR.ui.dialog.uiElement.call(this, dialog, elementDefinition, htmlList, 'div', stylesArg, attributesArg, innerHTML );
+		CKEDITOR.ui.dialog.uiElement.call(this, dialog, elementDefinition, htmlList, 'div', null, null, innerHTML );
 	}
 };
Index: /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2464)
+++ /CKEditor/branches/prototype/_source/plugins/dialogui/plugin.js	(revision 2464)
@@ -0,0 +1,113 @@
+/*
+ * CKEditor - The text editor for Internet - http://ckeditor.com
+ * Copyright (C) 2003-2008 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ */
+
+CKEDITOR.plugins.add( 'dialogui' );
+
+CKEDITOR.tools.extend( CKEDITOR.ui.dialog,
+	{
+		labeledElement : function( dialog, elementDefinition, htmlList, contentHtml )
+		{
+			if (arguments.length < 4)
+				return;
+
+			var innerHTML = function()
+			{
+				var html = [ '<div class="cke_dialog_ui_labeled_title">',
+						CKEDITOR.tools.htmlEncode( elementDefinition.title ),
+						'</div>',
+						'<div class="cke_dialog_ui_labeled_content">',
+						contentHtml( dialog, elementDefinition ),
+						'</div>'
+					];
+				return html.join( '' );
+			}
+			CKEDITOR.ui.dialog.uiElement.call( this, dialog, elementDefinition, htmlList, 'div', null, null, innerHTML );
+		},
+
+		inputElement : function( dialog, elementDefinition, htmlList, stylesArg, attributesArg, contentsArg )
+		{
+			if (arguments.length < 3)
+				return;
+
+			if ( !this._ )
+				this._ = {};
+			var attributes = ( attributesArg && attributesArg.call ? attributesArg( elementDefinition ) : attributesArg ) || {},
+				id = this._.inputId = elementDefinition.id && elementDefinition.id + '_inputElement',
+				styles = ( stylesArg && stylesArg.call ? stylesArg( elementDefinition ) : stylesArg ) || {},
+				inputContents = ( contentsArg && contentsArg.call ? contentsArg( dialog, elementDefinition) : contentsArg ) || '';
+
+			// Set the id for the inner input element.
+			if ( id )
+				attributes.id = attributes.name = id;
+
+			// Set the type.
+			attributes.type = elementDefinition.type;
+
+			// Set the type and definition CSS class names.
+			var classes = {};
+			classes[ 'cke_dialog_ui_input_' + elementDefinition.type ] = 1;
+			if ( elementDefinition.className )
+				classes[ elementDefinition.className ] = 1;
+			var attributeClasses = ( attributes.class && attributes.class.split ) ? attributes.class.split( ' ' ) : [];
+			for ( var i = 0 ; i < attributeClasses.length ; i++ )
+			{
+				if ( attributeClasses[i] )
+					classes[ attributeClasses[i] ] = 1;
+			}
+			var finalClasses = [];
+			for ( var i in classes )
+				finalClasses.push( i );
+			attributes.class = finalClasses.join( ' ' );
+
+			// Set the default value.
+			if ( elementDefinition.default )
+				attributes.value = elementDefinition.default;
+
+			// Write the inline CSS styles.
+
+			var innerHTML = function()
+			{
+				var html = [ '<input ' ];
+				for ( var i in attributes )
+					html.push( i + '="' + attributes[i] + '" ' );
+				html.push( '>', inputContents, '</input>' );
+				return html.join( '' );
+			}
+			CKEDITOR.ui.dialog.labeledElement.call( this, dialog, elementDefinition, htmlList, innerHTML );
+		}
+	});
+
+CKEDITOR.ui.dialog.labeledElement.prototype = new CKEDITOR.ui.dialog.uiElement;
+CKEDITOR.ui.dialog.inputElement.prototype = CKEDITOR.tools.extend( new CKEDITOR.ui.dialog.labeledElement,
+		{
+			getElement : function()
+			{
+				return CKEDITOR.document.getById( this._.inputId );
+			}
+		});
+
+CKEDITOR.dialog.addUIElement( 'text',
+		{
+			build : function( dialog, elementDefinition, output )
+			{
+				return new CKEDITOR.ui.dialog.inputElement( dialog, elementDefinition, output );
+			}
+		});
Index: /CKEditor/branches/prototype/_source/skins/default/dialog.css
===================================================================
--- /CKEditor/branches/prototype/_source/skins/default/dialog.css	(revision 2463)
+++ /CKEditor/branches/prototype/_source/skins/default/dialog.css	(revision 2464)
@@ -211,6 +211,7 @@
 	left: 0px;
 	right: 0px;
-	_width: expression(this.offsetParent.offsetWidth);
-	_height: expression(this.offsetParent.offsetHeight);
+	_width: expression(this.offsetParent.offsetWidth - 20);
+	_height: expression(this.offsetParent.offsetHeight - 20);
+	padding: 5px 10px;
 }
 
@@ -263,2 +264,15 @@
 	z-index: 1;
 }
+
+.cke_skin_default .cke_dialog_ui_vbox_child
+{
+	padding: 5px 0px;
+}
+
+.cke_skin_default .cke_dialog_ui_input_text
+{
+	background-color: white;
+	border: 1px solid #a0a0a0;
+	height: 16px;
+	width: 100%;
+}
