Index: /CKEditor/branches/prototype/_source/plugins/forms/dialogs/textarea.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/forms/dialogs/textarea.js	(revision 2712)
+++ /CKEditor/branches/prototype/_source/plugins/forms/dialogs/textarea.js	(revision 2712)
@@ -0,0 +1,134 @@
+/*
+ * 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.dialog.add( 'textarea', function( editor )
+{
+	var addChange = function( name, input ){
+		var dialog = input.getDialog();
+		if ( input.isChanged() || ( dialog.editMode == false && input.getValue() != '' ))
+		{
+			dialog.changedAttibutes[ name ] = input.getValue();
+			return true;
+		}
+		return false;
+	};
+
+	return {
+		title : editor.lang.extareaProp,
+		resizable : CKEDITOR.DIALOG_RESIZE_NONE,
+		minWidth : 400,
+		minHeight : 230,
+		onOk: function( data )
+		{
+			for( var name in this.changedAttibutes )
+			{
+				this.editObj.setAttribute(name, this.changedAttibutes[ name ] );
+			}
+			
+			if( this.editMode == false )
+			{
+				editor.insertElement( this.editObj );
+			}
+			return true;
+		},
+		onShow: function()
+		{
+			this.editMode = false;
+			
+			/*
+			Check selection.
+			Fill this.editObj if the TEXTAREA element is selected.
+			*/
+			
+			if( this.editMode == false )	//New object.
+			{
+				this.editObj = editor.document.createElement( 'textarea' );
+			}
+			
+			this.changedAttibutes = new Array();
+		},
+		contents : [
+			{
+				id : 'info',
+				label : editor.lang.extareaProp,
+				title : editor.lang.extareaProp,
+				accessKey : 'I',
+				elements : [
+					{
+						id : 'txtName',
+						type : 'text',
+						label : editor.lang.dlgTextareaName,
+						'default' : '',
+						accessKey : 'N',
+						validate: function()
+						{
+							addChange( 'name', this );
+							return true;
+						}
+					},
+					{
+						id : 'txtColumns',
+						type : 'text',
+						label : editor.lang.dlgTextareaCols,
+						'default' : '',
+						accessKey : 'C',
+						style : 'width:50px',
+						validate: function()
+						{
+							if ( this.getValue() != '' )
+							{
+								var maxChars = parseInt( this.getValue(), 10 );
+								if ( isNaN( maxChars ) )
+								{
+									this.select();
+									return false;
+								}
+								addChange( 'cols', this );
+							}
+							return true;
+						}
+					},
+					{
+						id : 'txtRows',
+						type : 'text',
+						label : editor.lang.dlgTextareaRows,
+						'default' : '',
+						accessKey : 'R',
+						style : 'width:50px',
+						validate: function()
+						{
+							if ( this.getValue() != '' )
+							{
+								var charWidth = parseInt( this.getValue(), 10 );
+								if ( isNaN( charWidth ) )
+								{
+									this.select();
+									return false;
+								}
+								addChange( 'rows', this );
+							}
+							return true;
+						}
+					}
+				]
+			}
+		]
+	};
+});
Index: /CKEditor/branches/prototype/_source/plugins/forms/plugin.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/forms/plugin.js	(revision 2711)
+++ /CKEditor/branches/prototype/_source/plugins/forms/plugin.js	(revision 2712)
@@ -53,4 +53,11 @@
 		editor.addCommand( 'textfield', new CKEDITOR.dialogCommand( 'textfield' ) );
 
+		editor.ui.addButton( 'Textarea',
+			{
+				label : editor.lang.textarea,
+				command : 'textarea'
+			});
+		editor.addCommand( 'textarea', new CKEDITOR.dialogCommand( 'textarea' ) );
+
 		editor.ui.addButton( 'Select',
 			{
@@ -85,4 +92,5 @@
 		CKEDITOR.dialog.add( 'radio', 		this.path + 'dialogs/radio.js' );
 		CKEDITOR.dialog.add( 'textfield',	this.path + 'dialogs/textfield.js' );
+		CKEDITOR.dialog.add( 'textarea',	this.path + 'dialogs/textarea.js' );
 		CKEDITOR.dialog.add( 'select',		this.path + 'dialogs/select.js' );
 		CKEDITOR.dialog.add( 'button',		this.path + 'dialogs/button.js' );
