unable to attach form due to dhtmlx editor in tab form

Hi,

we are trying to create dhtmlx Editor in the muliple forms which contains the tabs.

we had a tree when we click on the nodes of the tree individual forms should load with tabs.

so when we flow throw between nodes we are getting the following error

TypeError: this.edWin is null

;this.edWin=this.editor.contentWindow;this.edDoc=this.edWin.document;this

dhtmlx.js (line 9, col 444665)

Version: 4.1.2

The code is

var miscellaneousDescformItems = [
{type:“settings”, position:“absolute”, labelWidth:“200”, inputHeight:“20” ,labelHeight:“20” ,inputWidth:“60”},
{type:“editor”,name:“menvIntendedUseDescr” ,label:“description :” , labelLeft:“50”,labelTop:“40”, toolbar:true, iconsPath: “JavaScripts/dhtmlx4/codebase/imgs”, inputWidth:“670”, inputHeight:“110”, inputLeft:“250”, inputTop:“10” }
];
function sysenv()
{
if(envTabbar.cells(‘envdetails’).getAttachedObject() != undefined)
{
envTabbar.cells(‘envdetails’).detachObject();
}
var envDetailsTab = envTabbar.cells(‘envdetails’).attachLayout(‘1C’);
var sysEnvnvViewTab = envDetailsTab.cells(‘a’).attachTabbar();
addSysEnvFormTabbar(sysEnvnvViewTab);
var systemEnvForm = sysEnvnvViewTab.cells(‘envConfiguration’).attachForm();
systemEnvForm.loadStruct(“…………. ”);

// var systemEnvForm = envTabbar.cells(‘envdetails’).attachForm();

}
function addSysEnvFormTabbar(envFormTabbar)
{
envFormTabbar.addTab(‘envConfiguration’, ‘Configuration Details’, 150, 0, true, false);
envConfiguration = envFormTabbar.cells(‘envConfiguration’);
envFormTabbar.addTab(‘miscellaneousDesc’, ‘Miscellaneous Description’, 150, 1, false, false);
miscellaneousDesc = envFormTabbar.cells(‘miscellaneousDesc’);
miscellaneousDescForm = miscellaneousDesc.attachForm(miscellaneousDescformItems); // error occurred in this line of code

       }

we are using tab form inside tab.


Your code works fine locally - see demo
What browser and OS version do you have?
form_editor.zip (439 KB)