DHTMLX Docs & Samples Explorer

Integration with dhtmlxEditor

Integration with dhtmlxEditor

Source
<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxtabbar.css">
<script  src="../../codebase/dhtmlxcommon.js"></script>
<script  src="../../codebase/dhtmlxtabbar.js"></script>
<!-- attaching a dhtmlxEditor -->
<script src="../../../dhtmlxEditor/codebase/dhtmlxeditor.js"></script>
<link rel="stylesheet" type="text/css" href="../../../dhtmlxEditor/codebase/skins/dhtmlxeditor_dhx_skyblue.css">
<!-- dhtmlxToolbar -->
<script src="../../../dhtmlxToolbar/codebase/dhtmlxtoolbar.js"></script>
<link rel="stylesheet" type="text/css" href="../../../dhtmlxToolbar/codebase/skins/dhtmlxtoolbar_dhx_skyblue.css">
<script src="../../codebase/dhtmlxcontainer.js"></script>
 
 
<h1 id="init_tabbar_from_script">Integration with dhtmlxEditor</h1>
<div id="a_tabbar" style="width:395px; height:390px;"/>
<script>
tabbar = new dhtmlXTabBar("a_tabbar", "top");
tabbar.setSkin('dhx_skyblue');
tabbar.setImagePath("../../codebase/imgs/");
tabbar.addTab("a1", "Tab 1-1", "100px");
tabbar.addTab("a2", "Tab 1-2", "100px");
tabbar.setTabActive("a1");
var dhxEditor = tabbar.cells("a1").attachEditor();
dhxEditor.setIconsPath("../../../dhtmlxEditor/codebase/imgs/");
dhxEditor.init();
tabbar.cells("a2").attachHTMLString("<div style='width:100%; height:100%;background-color:white;'>Just some content</div>");
</script>