|
Posted by Chris on 02/03/06 00:23
Hi,
javascript text can't be written over multiple lines, so in javascript:
var mystring = 'blah blah
blah blah';
will break.
var mystring = 'blah blah\nblah blah';
will not break but will include your line breaks.
Something like:
str_replace("\n", '\n', $text);
should do it.
GooderThanYou wrote:
> First off, what is the good way to do editable IFrames? I'm using
> IFrame as a way to do RTF. So far it's worked all but when you have a
> return character, here's some of the code.
>
> IFRAME width=600 HEIGHT=400 scrolling="yes" ID=service></IFRAME>
> <? echo '<script type="text/javascript" language="javascript">
> service.document.write("'.$currentInfo.'");
> service.document.designMode = "On";
> </script>' ?>
>
> I am printing to word document and everything is there fine.
>
> When there is a return space....
> I cannot edit the IFrame any more
> The text won't appear in the IFrame when loaded
> (probably some error being thrown, it says theres an unterminated
> string constant in the error on page thing)
>
> Thanks in advance
>
[Back to original message]
|