Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 6318)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagTable.java	(revision 6319)
@@ -15,6 +15,9 @@
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.EventObject;
+import java.util.List;
+import java.util.Map;
 import java.util.concurrent.CopyOnWriteArrayList;
 
@@ -35,11 +38,16 @@
 
 import org.openstreetmap.josm.Main;
-import org.openstreetmap.josm.actions.PasteTagsAction.TagPaster;
+import org.openstreetmap.josm.actions.PasteTagsAction;
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.data.osm.PrimitiveData;
 import org.openstreetmap.josm.data.osm.Relation;
+import org.openstreetmap.josm.data.osm.Tag;
 import org.openstreetmap.josm.gui.dialogs.relation.RunnableAction;
+import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionList;
 import org.openstreetmap.josm.gui.tagging.ac.AutoCompletionManager;
 import org.openstreetmap.josm.tools.ImageProvider;
+import org.openstreetmap.josm.tools.TextTagParser;
+import org.openstreetmap.josm.tools.Utils;
 
 /**
@@ -324,8 +332,28 @@
             Relation relation = new Relation();
             model.applyToPrimitive(relation);
-            TagPaster tagPaster = new TagPaster(Main.pasteBuffer.getDirectlyAdded(), Collections.<OsmPrimitive>singletonList(relation));
-            model.updateTags(tagPaster.execute());
-        }
-
+            
+            String buf = Utils.getClipboardContent();
+            if (buf == null || buf.isEmpty() || buf.matches("(\\d+,)*\\d+")) {
+                List<PrimitiveData> directlyAdded = Main.pasteBuffer.getDirectlyAdded();
+                if (directlyAdded==null || directlyAdded.isEmpty()) return;
+                PasteTagsAction.TagPaster tagPaster = new PasteTagsAction.TagPaster(directlyAdded, Collections.<OsmPrimitive>singletonList(relation));
+                model.updateTags(tagPaster.execute());
+            } else {
+                // Paste tags from arbitrary text
+                 Map<String, String> tags = TextTagParser.readTagsFromText(buf);
+                 if (tags==null || tags.isEmpty()) {
+                    TextTagParser.showBadBufferMessage(ht("/Action/PasteTags"));
+                 } else if (TextTagParser.validateTags(tags)) {
+                     List<Tag> newTags = new ArrayList<Tag>();
+                     for (Map.Entry<String, String> entry: tags.entrySet()) {
+                        String k = entry.getKey();
+                        String v = entry.getValue();
+                        newTags.add(new Tag(k,v));
+                     }
+                     model.updateTags(newTags);
+                 }
+            }
+        }
+        
         protected void updateEnabledState() {
             setEnabled(TagTable.this.isEnabled());
