client/README.md
changeset 264 cc1b3aa8cada
parent 253 9851e84a0b37
child 265 2a93b8166531
--- a/client/README.md	Thu Feb 13 17:23:25 2014 +0100
+++ b/client/README.md	Fri Feb 14 12:40:52 2014 +0100
@@ -282,6 +282,39 @@
         });
     </script>
 
+
+## Drop management
+
+You can override, partially or totally, the function that handle the drop event from an other web page.
+The current function catches drops from google results page, tweets, links, images and other things like svg paths.
+If you want to override totally the handler function, you can define a **drop\_handler** function that receives a \_data object
+and returns a node object. A node object has title, description, image and uri properties. The \_data object is received from the 
+browser's drop event. Here is an example of drop\_handler function :
+
+    _renkan = new Rkns.Renkan({
+        ...
+        drop_handler: function(_data){
+            var newNode = {};
+            newNode.title = "Overridden title";
+            newNode.description = "Overridden description " + _data["text/plain"];
+            return newNode;
+        }
+    });
+
+
+You can also define a **drop\_enhancer** function that receives the already formed node object and \_data object. This function has to 
+return the overriden node object. Here is an example of drop\_enhancer function :
+
+    _renkan = new Rkns.Renkan({
+        ...
+        drop_enhancer: function(newNode, _data){
+            newNode.title = "Overridden title";
+            return newNode;
+        }
+    });
+
+
+
 ## Tests
 
 Because of a simple php file enabling persistent connection, you can not test the writables examples by only opening them in your browser.