Intergration with dhtmlxEditor
</> Source
<!DOCTYPE html>
<html>
<head>
<title>Intergration with dhtmlxEditor</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>
<script>
dhtmlx.image_path = "codebase/imgs/";
var myDataView, myEditor;
function doOnLoad() {
myDataView = new dhtmlXDataView({
container:"data_container",
type:{
template:"<p><b>#author#: #title#</b></p>#desc#<p>Price: <b>#lprice#</b></p>",
height:225,
template_edit:"<div id='editorObj' style='width: 100%; height: 100%;'></div>",
width:400
},
edit:true
});
myDataView.load("../common/books.xml");
myDataView.attachEvent("onAfterEditStart",function(id){
myEditor = new dhtmlXEditor("editorObj");
myEditor.setContent(myDataView.get(id).desc);
});
myDataView.attachEvent("onBeforeEditStop",function(id){
myDataView.get(id).desc = myEditor.getContent();
})
}
</script>
</head>
<body onload="doOnLoad();">
<h1>Intergration with dhtmlxEditor</h1>
<div id="data_container" style="border:1px solid #c0c0c0; background-color:white;width:860px;height:396px;position:relative"></div>
</body>
</html>
Documentation
Check documentation to learn how to use the components and easily implement them in your applications.