Categories | Question details Back To List | ||||||||
window - editor I use the pro 2.1 version and I have a problem when I 'm using an editor within a window. I 've created the same thing in the past successfully, but now I don't understand what is giong on. First I tried to attach an Editor to a Window. The toolbar was disappeared and editor didn't work well. So, I decided to work by the other way, by attaching to the window an object div, and into the div the Editor. My code is as: winNotes = dhxPlayWins.createWindow("wNotes", (window.innerWidth/2)- 350, 50, 600, 390); winNotes.setText("User Notes on item: "+my_num); winNotes.btns["close"]._doOnClick = function() { winNotes.hide(); } winNotes.setModal(true); editor = new dhtmlXEditor("editorNotes","standard"); var editorNotes=document.getElementById("editorNotes"); winNotes.attachObject(editorNotes,true); editor.setIconsPath(images); editor.init(); editor.tb.attachEvent("onClick",function(id) { if(id=="sn") { saveTradeNotes(editor.getContent()); winNotes.hide(); } }); editor.tb.addButton("sn", 0, "Save","save.gif","save_dis.gif"); The result now appearing better, but the editor can't accept input at all. Second, when I press the close button, the window closes but the Modal mode stays true for the behind windows! Is there anythin wrong to my code? Thanks in advance Answer posted by Alex (support) on Sep 08, 2009 02:21 >> The result now appearing better, but the editor can't accept input at all. the issue wasn't confirmed - see attached sample. >> Second, when I press the close button, the window closes but the Modal mode stays true for the behind windows! You've changed the close behaviour. So, you should call setModal(false) method in the on close handler. Attachments (1)
|