Check documentation for the latest version of dhtmlxSuite Adding Editor to DHTMLX Components DHTMLX Docs

Adding Editor to DHTMLX Components

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

Attaching to an accordion's cell

myAcc = new dhtmlXAccordion("accObj");
myEditor = myAcc.cells("a1").attachEditor({content:"Type some text"});

Related sample:  Attach to accordion


Learn more about accordions here.

Attaching to a layout's cell

myLayout = new dhtmlXLayoutObject("layoutObj", "3L");
myEditor = myLayout.cells("a").attachEditor({content:"Type some text"});

Related sample:  Attach to layout


Learn more about layouts here.

Attaching to a tabbar's tab

myTabbar = new dhtmlXTabBar("my_tabbar");
myEditor = myTabbar.tabs("a1").attachEditor({content:"Type some text"});

Related sample:  Attach to tabbar


Learn more about tabbars here.

Attaching to a window

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.

Editor as a form's control

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.

Attaching to a pop-up window

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.

Back to top