Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text2Html
#1
How can I convert a str to 'html format' like http://www.cybermatrix.com/text2html.html?
#2
Macro
Code:
Copy      Help
str text="some ''text'' & > < ąč"
HtmlDoc d.InitFromText(text)
str html=d.GetHtml
out html

;some more processing needed, eg replace " to &quot;, specify charset, etc
#3
This way doesn't convert links,...

Macro
Code:
Copy      Help
out
str text="This is a link http://www.quickmacros.com[][]and this is another line"
HtmlDoc d.InitFromText(text)
str html=d.GetHtml
out html

;some more processing needed, eg replace " to &quot;, specify charset, etc


result:

<HTML><HEAD></HEAD>
<BODY>This is a link http://www.quickmacros.com and this is another line</BODY></HTML>
#4
Replace links using regular expression.
#5
I was looking for something like http://www.katspace.org/tools/text_to_html/


Forum Jump:


Users browsing this thread: 1 Guest(s)