Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ethan Anwar on May 28, 2009 12:48
open dhtmlx forum
dhtmlxEditor Save file

How could i implement a SAVE button in the dhtmlxEditor so i could save the contents in the textarea into an external .txt or .xml file?
Furthermore I saw there was a problem with the textarea width and two scrollbars showing up in Firefox 3. I saw that you resolved that problem if the dhtmlxEditor was created in html but i created it into a dhtmlxwindow and i'm still having a problem.
Here's the code:

var fereastra = new dhtmlXWindows();
    fereastra.enableAutoViewport(false);
    fereastra.attachViewportTo("wrapper")
    fereastra.vp.style.border = "none";
    fereastra.setImagePath("../../codebase/imgs/");
    fereastra.setEffect("move", true);
fereastra.setEffect("resize", true);
    

    var w2 = fereastra.createWindow("w2", 30, 30, 600, 600);    
    w2.setText("test");
    var layout2 = w2.attachLayout("2E");
    
    var editor1 = layout2.cells("a").attachEditor();
editor1.setIconsPath("../dhtmlxEditor/codebase/imgs/");
editor1.init();

Answer posted by Alex (support) on May 29, 2009 02:05
Hello,

regarding scrolls... please, check attached sample. It contains the latest dhtmlx libraries. The issue doesn't appear in it.
If the latest files don't resolve the issue, please let us know.

Editor provides getContent method. This method returns content of the editor:

  var content = editor.getContent();

You can use for example dhtmlxAjax (post(....) method) to pass this string to the server.
Attachments (1)
Answer posted by yap,that worked, thank you very much! on May 31, 2009 09:55