Gerold Kumpfhuber: WYSIWYG

Beitrag lesen

Lieber Dieter,

ins Web stellen kann ich es nicht, da dies für ein Intranet ist und ich keinen Webspace habe. Die Tabelle erzeuge ich auf folgende art:
function CreateTable(){
          var zeile = prompt("Zeilenanzahl","1");
          var spalte = prompt("Spaltenanzahl","1");
          var text='<table border="1" width="100%">';
          var widthSpalte = 100/spalte;
          for (i=0;i<zeile;i++){
               text+='<tr>';
               for (j=0;j<spalte;j++){
                    text += '<td width="'+widthSpalte+'%" valign="top"></td>';
                }
               text+='</tr>';
          }
          text+='</table>';
          editor_content.document.selection.createRange().pasteHTML(text);
 }

und stelle sie dann im iframe dar:
<iframe width="100%" id="editor_content" src="blank.html" height="280"></iframe>

LG
Gerold