The table below presents DHTMLX components that you can attach a dhtmlxEditor object to and code samples of such attaching.
To attach an Editor to a DHTMLX component, use the attach[NameofComponent] method of the related component
myAcc = new dhtmlXAccordion("accObj");
myEditor = myAcc.cells("a1").attachEditor({content:"Type some text"});
Related sample: Attach to accordion
Learn more about accordions here.
myLayout = new dhtmlXLayoutObject("layoutObj", "3L");
myEditor = myLayout.cells("a").attachEditor({content:"Type some text"});
Related sample: Attach to layout
Learn more about layouts here.
myTabbar = new dhtmlXTabBar("my_tabbar");
myEditor = myTabbar.tabs("a1").attachEditor({content:"Type some text"});
Related sample: Attach to tabbar
Learn more about tabbars here.
dhxWins = new dhtmlXWindows();
dhxWins.attachViewportTo("winVP");
w1 = dhxWins.createWindow("w1", 20, 30, 400, 280);
myEditor = w1.attachEditor({content:"Type some text"});
Related sample: Attach to window
Learn more about windows here.
formData = [
{type:"settings", labelWidth:90},
{type:"editor", name:"band", label:"Band", value:"Motorhead"},
{type:"editor", name:"title", label:"Title", value:"Smiling Like A Killer"}
];
myForm = new dhtmlXForm("myForm", formData);
Related sample: Attach to form
Learn more about forms here.
myPop = new dhtmlXPopup({ toolbar: myToolbar, id: "workbut" });
myPop.attachEvent("onShow", function(){
if (!myEditor) {
myEditor = myPop.attachEditor(400, 200, {content:"Type some text"});
}
});
Related sample: Attach to popup
Learn more about pop-up windows here.