thanks a lot for the help. I tryed the "prompt" solution, nice, but there are some problems. In fact using this method the topic is saved in a strange mode (all the icons to edit or quote are in vertical ??). Moreover using the prompt method i can insert only one cell of the table, and i'd like to insert more columns and rows. I think that changing the function is possible, isn't it???
function table() { var text = getText(); var type = "n"; if (helpstat){ alert("Table tag Builds a table around the enclosed text.\n\nUSE: [table][tr][td]text here[/td][/tr][/table]"); } else if (basic) { AddTxt="[table][tr][td]" + text + "[/td][/tr][/table]"; AddText(AddTxt); } else {
AddTxt="[table][tr]"; while(type!="y"){ txt="1"; while ((txt!="")&&(txt!=null)){ txt=prompt("Inserisci i valori della cella e lascia il campo vuoto per chiudere la riga",text); if (txt!=""){ AddTxt+="[td]"+txt+"[/td]"; } } AddTxt+="[/tr][tr]"; type=prompt("Hai finito la tabella (y/n) ??","text"); } AddTxt+="[/table]"; AddText(AddTxt);