Click to See Complete Forum and Search --> : printing problems long lines


trouvailles
08-28-2003, 08:37 AM
I can't figure out how to change the print function from my online text editor so that it deals better with paragraphs:

http://fslactivities.sd61.bc.ca/ezHTMLarea/popups/plaintext.html

Paragraphs appear in long lines even if the text is inserted in a table. Here's the code I'm using:

function pt()
{
pw = window.open("","_blank","width=760,height=500,menubar=yes");
pw.document.open("html");

pw.document.write('<html>\n');
pw.document.write('<body>\n');
pw.document.write('<body>\n');
pw.document.write('<TABLE cellSpacing=0 cellPadding=0 width="700" border=0><TBODY><TR><TD>\n');
pw.document.write('<pre>\n');

pw.document.write(document.plaintext.message.value);

pw.document.write('</pre>\n');
pw.document.write('</TD></TR></TBODY></TABLE>\n');
pw.document.write('</body>\n');
pw.document.write('</html>\n');

pw.document.close();
if(window.print){pw.print()}
else{pw.alert("Use the menu to print the page or CTRL-P")}
}