<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">David,<div><br></div><div>Thanks for the functions! I'll send you some if I go this route and write any of my own. I just can't believe that the RevBrowser external doesn't allow for the rending of a local html doc passed through.</div><div><br></div><div>Ray Horsley</div><div>LinkIt! Sofware</div><div> <br><div><div>On Feb 10, 2009, at 4:40 AM, David Bovill wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">2009/2/10 Ray Horsley <span dir="ltr"><<a href="mailto:Ray@linkit.com">Ray@linkit.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div style="">Thanks Brian but I'm afraid including the <body> tags doesn't render anything either. I've also tried including a document declaration as in the example below but I'm still getting nothing rendered. (That's the trouble when working with externals. You can't open them up to see what's going on.)<div> <br></div><div>Any other ideas are welcome.</div></div></blockquote><div><br>Hi Ray - did a bit of work on this recently. AFAIK the only way is to process the raw html, and create your own htmltext. Here are the handlers I've got so far: <br> <br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">--> HTML | Span<br>-<br>/* Strip span tags<br>These functions replace html span tags such as those found in basic html / jabber / im html with tags for rev htmltext<br> */<br><br>function html_BasicToRev someHtml<br> put html_BoldSpanToRev(someHtml) into someHtml<br> put html_ColourSpanToRev(someHtml) into someHtml<br> return someHtml<br>end html_BasicToRev<br><br>function html_RevToBasic someHtmlText<br> put html_RevToColourSpan(someHtmlText) into someHtml<br> return html_RevToBoldSpan(someHtml)<br>end html_RevToBasic<br><br>function html_RevToColourSpan someHtml<br> replace quote with "'" in someHtml<br> put "(?miU)(<font color=').*(</font>)" into someReg<br> repeat<br> if matchchunk(someHtml, someReg, oTagStart, oTagEnd, cTagStart, cTagEnd) is true then<br> put "</span>" into char cTagStart to cTagEnd of someHtml<br> put "<span style='color:" into char oTagStart to oTagEnd of someHtml<br> else<br> replace quote with "'" in someHtml<br> return someHtml<br> end if<br> end repeat<br>end html_RevToColourSpan<br><br>function html_RevToBoldSpan someHtml<br> put "(?miU)(<b>).*(</b>)" into someReg<br> -- put "(?mi)(<b>)[^\<]*(</b>)" into someReg<br> repeat<br> if matchchunk(someHtml, someReg, oTagStart, oTagEnd, cTagStart, cTagEnd) is true then<br> put "</span>" into char cTagStart to cTagEnd of someHtml<br> put "<span style='font-weight:bold'>" into char oTagStart to oTagEnd of someHtml<br> else<br> return someHtml<br> end if<br> end repeat<br>end html_RevToBoldSpan<br><br>function html_ColourSpanToRev someHtml<br> -- U is for non-greedy<br> replace quote with "'" in someHtml<br> put "(?miU)(<span style='color:).*(</span>)" into someReg<br> -- put "(?mi)(<span style='color:)[^\<]*(</span>)" into someReg<br> repeat<br> if matchchunk(someHtml, someReg, oTagStart, oTagEnd, cTagStart, cTagEnd) is true then<br> put "</font>" into char cTagStart to cTagEnd of someHtml<br> put "<font color='" into char oTagStart to oTagEnd of someHtml<br> else<br> replace "'" with quote in someHtml<br> return someHtml<br> end if<br> end repeat<br>end html_ColourSpanToRev<br><br>function html_BoldSpanToRev someHtml<br> put "(?miU)(<span style='font-weight:bold'>).*(</span>)" into someReg<br> -- put "(?mi)(<span style='font-weight:bold'>)[^\<]*(</span>)" into someReg<br> repeat<br> if matchchunk(someHtml, someReg, oTagStart, oTagEnd, cTagStart, cTagEnd) is true then<br> put "</b>" into char cTagStart to cTagEnd of someHtml<br> put "<b>" into char oTagStart to oTagEnd of someHtml<br> else<br> return someHtml<br> end if<br> end repeat<br>end html_BoldSpanToRev<br></blockquote><br>If you improve them do post back. I'm interested in getting robust two way html "<span>" to rev htmltext based style sheets working :)<br></div> </div><br> _______________________________________________<br>metacard mailing list<br><a href="mailto:metacard@lists.runrev.com">metacard@lists.runrev.com</a><br>http://lists.runrev.com/mailman/listinfo/metacard<br></blockquote></div><br></div></body></html>