Index: /main/trunk/greenstone3/web/interfaces/default/js/document_scripts.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/js/document_scripts.js	(revision 29977)
+++ /main/trunk/greenstone3/web/interfaces/default/js/document_scripts.js	(revision 29978)
@@ -1089,7 +1089,16 @@
 function addEditableState(editable,stateArray)
 {
+	if(editable.tagName == 'TEXTAREA')
+	{
+		nodeText = editable.value;
+	}  
+	else 
+	{
+	 	nodeText = editable.innerHTML;
+	}
+
         stateArray.push({
                 editableNode : editable,
-                initHTML : editable.innerHTML
+                initHTML : nodeText
         });
 }
@@ -1099,5 +1108,5 @@
 	editableLastStates = [];
         $(".sectionText").each(function(){addEditableState(this,editableLastStates);});
-        $(".metaTableCell").each(function(){addEditableState(this,editableLastStates);});
+        $(".metaTableCellArea").each(function(){addEditableState(this,editableLastStates);});
 
 }
Index: /main/trunk/greenstone3/web/interfaces/default/js/documentmaker_scripts_util.js
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/js/documentmaker_scripts_util.js	(revision 29977)
+++ /main/trunk/greenstone3/web/interfaces/default/js/documentmaker_scripts_util.js	(revision 29978)
@@ -296,5 +296,5 @@
       var name = nameCell.innerHTML;
       var valueCell = cells[1];
-      var value = valueCell.innerHTML;
+      var value = valueCell.getElementsByTagName("TEXTAREA")[0].value;
       metadataChanges.push({type:'delete', docID:docID, name:name, value:value});
       removeFromParent(currentRow);
@@ -308,7 +308,6 @@
 	{
 		var changedElem = changes[i];
-		
 		//Save metadata 	
-		if(gs.functions.hasClass(changedElem, "metaTableCell")) 
+		if(gs.functions.hasClass(changedElem, "metaTableCellArea")) 
 		{
 			//Get document ID
@@ -318,9 +317,9 @@
 
 			//Get metadata name
-			var row = changedElem.parentNode;
+			var row = changedElem.parentNode.parentNode;
 			var cells = row.getElementsByTagName("TD");
 			var nameCell = cells[0];
 			var name = nameCell.innerHTML;
-			var value = changedElem.innerHTML;
+			var value = changedElem.value;
 			value = value.replace(/&nbsp;/g, " ");
 
@@ -330,5 +329,5 @@
 			}
 			metadataChanges.push({collection:collection, docID:docID, name:name, value:value, orig:orig});
-			changedElem.originalValue = changedElem.innerHTML;
+			changedElem.originalValue = changedElem.value;
 			addCollectionToBuild(collection);
 		}
@@ -720,5 +719,5 @@
 {
 	//This registering can cause a sizeable delay so we'll thread it (effectively) so the browser is not paused
-	cell.originalValue = cell.innerHTML;
+	cell.originalValue = cell.value;
 	setTimeout(function(){addEditableState(cell, editableInitStates)}, 0);
 }
@@ -793,5 +792,5 @@
 		}
 			
-		asyncRegisterEditSection(cells[1]);
+		asyncRegisterEditSection(cells[1].getElementsByTagName("textarea")[0]);
 		addRemoveLinkToRow(this);
 	});
@@ -812,10 +811,10 @@
 		}
 		
-		var newRow = $("<tr>");
+		var newRow = $("<tr>", {"style": "display: table-row;"});
 		var nameCell = $("<td>" + name + "</td>");
 		nameCell.attr("class", "metaTableCellName");
-		var valueCell = $("<td>", {"class": "metaTableCell"});
-		valueCell.attr("contenteditable","true");
-		
+		var valueCell = $("<td>", {"class": "metaTableCell"}); 	
+		var textValue = $("<textarea>", {"class": "metaTableCellArea"}); 
+		valueCell.append(textValue);
 		newRow.append(nameCell);
 		newRow.append(valueCell);
Index: /main/trunk/greenstone3/web/interfaces/default/style/core.css
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/style/core.css	(revision 29977)
+++ /main/trunk/greenstone3/web/interfaces/default/style/core.css	(revision 29978)
@@ -489,4 +489,15 @@
 #resultsTable .shelf>a { background-image: url('../images/bookshelf.png'); }
 
+.metaTableCell { border: 1;}
+.metaTableCellArea {
+	border: none; 
+	resize: none; 
+	outline: none; 
+	overflow: auto; 
+	width: 400px; 
+	-webkit-box-sizing: border-box; 
+	-moz-box-sizing: border-box; 
+	box-sizing: border-box; 
+}
 /* corners of the banner */
 /*
Index: /main/trunk/greenstone3/web/interfaces/default/transform/pages/document.xsl
===================================================================
--- /main/trunk/greenstone3/web/interfaces/default/transform/pages/document.xsl	(revision 29977)
+++ /main/trunk/greenstone3/web/interfaces/default/transform/pages/document.xsl	(revision 29978)
@@ -207,5 +207,5 @@
 							<tr>
 								<td class="metaTableCellName"><xsl:value-of select="@name"/></td>
-								<td class="metaTableCell" contenteditable="true"><xsl:value-of select="."/></td>
+								<td class="metaTableCell"> <textarea autocomplete="off" class="metaTableCellArea"><xsl:value-of select="."/></textarea></td>
 							</tr>
 						</xsl:if>
