HTMLText Errors
Derek Bump
webmaster at dreamscapesoftware.com
Wed Aug 25 20:56:49 EDT 2004
I've been playing with the HTMLText property and use the function below to convert the HTML to CSS. I'm just running into 1 problem though. When the text size is "10", the HTMLText property will not attach the size="10" attributes to the <font> tag. Any idea why? Any ideas on a way around this?
function HTMLtoCSS theResult
replace (quote& " ") with "; " in theResult
replace ("<p><font face=" "e) with ("<span style=" "e& "font-family: ") in theResult
replace (" size=" "e) with (" font-size: ") in theResult
replace (" color=" "e& "#") with (" color: ") in theResult
replace ("</font></p>") with ("</span></br>") in theResult
replace "<p></p>" with "<br>" in theResult
return ("<p>" & theResult & "</p>")
end HTMLtoCSS
Derek Bump
Dreamscape Software
____________________________________________
Compress Images Easily with JPEGCompress
http://www.dreamscapesoftware.com
More information about the use-livecode
mailing list