"Replace" unformats text
Jan Schenkel
janschenkel at yahoo.com
Sun Nov 28 00:40:49 EST 2004
--- Terry Vogelaar <tvogelaar at de-mare.nl> wrote:
> I'm doubting whether this belongs on the improve
> list or the use list.
> But since I just need a workaround for now, I
> decided to choose the Use
> list.
>
> I tried to set the htmltext of a field to some html
> file. That worked
> OK; the text appeared formatted. But then I used
> "replace return &
> return & return with return & return" in that field,
> and all the
> formatting was gone.
>
> Is there a way to maintain the text formatting,
> while replacing those
> ugly double white lines by single white lines? Or is
> GREPing through
> the HTML code the only way?
>
> Terry
>
Hi Terry
Since lines in the text correspond to lines in the
htmlText in Revolution, it should be easy enough to
replace data inside the htmlText :
--
put the htmlText of field "foobar" into tHtmlText
replace (return & "<p></p>" & return & "<p></p>" & \
return) with (return & "<p></p>" & return) in \
tHtmlText
set the htmlText of field "foobar" to tHtmlText
--
Hope this helped,
Jan Schenkel.
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - Get yours free!
http://my.yahoo.com
More information about the use-livecode
mailing list