Drag-and-drop text
</> Source
<!DOCTYPE html>
<html>
<head>
<title>Drag-and-drop text</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
<script src="../../../codebase/dhtmlx.js"></script>
<style>
body {
-webkit-user-select:none;
-moz-user-select:none;
user-select:none;
}
</style>
<script>
var myDataView;
function doOnLoad() {
myDataView = new dhtmlXDataView({
container:"data_container1",
type:{
template:"#Package# : #Version#<br/>#Maintainer#",
padding:5,
height:50
},
drag:true
});
myDataView.attachEvent("onBeforeDrag",function(context,e){
context.html = "<div style='background-color:white; font-family:Tahoma; padding:10px;'>Drag "+context.source.length+" item(s)</div>";
return true;
});
myDataView.load("../common/data.xml");
}
</script>
</head>
<body onload="doOnLoad();">
<h1>Drag-and-drop text</h1>
<table border="0" cellspacing="5" cellpadding="5">
<tr>
<td>
<div id="data_container1" style="border:1px solid #c0c0c0; background-color:white;width:460px;height:396px;"></div>
</td>
</tr>
</table>
</body>
</html>
Documentation
Check documentation to learn how to use the components and easily implement them in your applications.