Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Klaus Kohlschuetter on Feb 02, 2009 11:06
open dhtmlx forum
dhtmlxWindow and dhtmlxEditor

Hi all,

I've got some problems using dhtmlxWindow and dhtmlxEditor.
1. Creating the window works perfekt and the header line appears.
2. The editor appears but fills just 50% (horizontal) of the parent window. The height of the object is correct (100%).
2. Moving (enlarge or make smaller) has no effect on the size of the editor object.
3. The icons on top are not visible (the path to the images may be wrong).
4. How to upload an existig file into the editor and how to save the text automatically.

Here my example:

<script>
function CreateWindow( url, header ) {
var winW = document.body.offsetWidth;
var winH = document.body.offsetHeight;
if(dhxWins==null){
var dhxWins = new dhtmlXWindows();
dhxWins.enableAutoViewport(false);
dhxWins.vp.style.overflow = "auto";
dhxWins.setViewport( 0, 0, winW, winH );
dhxWins.setImagePath("../../dhtmlx/dhtmlxWindows/imgs/");
dhxWins.setSkin("web");
        
var w1 = dhxWins.createWindow("w1", 50, 50, 500, 500);
w1.setText( header );
w1.button("close").show();
w1.button("help").hide();
w1.button("park").hide();
    
dhxWins.window("w1").attachEvent("onClose", function(){
dhxWins.setViewport( 0, 0, 0,0 );
dhxWins.close;
});
} else {
dhxWins.setViewport( 0, 0, winW, winH );
}
    
dhxWins.window("w1").clearIcon();
dhxWins.window("w1").setModal(true);
//dhxWins.window("w1").attachURL( url , false);
dhxWins.window("w1").center();

var dhxEditor = w1.attachEditor();
dhxEditor.setIconsPath("../../dhtmlx/dhtmlxEditor/imgs");
dhxEditor.init();
}
</script>

Can you help me?

Best regards,
Klaus Kohlschuetter
Answer posted by Support on Feb 03, 2009 01:33

Please, check that all necessary css files are included. The ready sample is dhtmlxWindows/samples/components/editor.html (at our website: http://dhtmlx.com/docs/products/dhtmlxWindows/samples/components/editor.html) 

You can use the following methods to place html into the editor:

setContentHTML(path_to_the_file);

setContent(html_string);

Method getContent() allows to get the html content of the editor.