Code: Select all
set the htmlText of the templateField to tHTML -- the raw web page content
put the text of the templateField into tPlainText -- yields text without any tags
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Code: Select all
set the htmlText of the templateField to tHTML -- the raw web page content
put the text of the templateField into tPlainText -- yields text without any tags
Code: Select all
set the htmlText of fld "output_fld" to myData
Code: Select all
put myData into fld "output_fld"
In any case that does not concern me here as I only want the plain text extracted and these two things seem to be ignored.<a> </a> Encloses text whose textStyle is "link" or whose linkText property is not empty. If the textStyle of the text contains "link", the linkText is included as the value of the "href" attribute. Otherwise, it is included as the value of the "name" attribute.
<img src="imageSpecifier"> Replaces a character whose imageSource property is not empty. The value of the imageSource property is included as the value of the "src" attribute.
The templateField is handy that way. You can get similar performance with a field on an unopened card as well. The reason is that when a card is loaded for rendering the line wraps need to be calculated, but none of those calculations are done with the templateField or a field on an unopened card since they can't be seen anyway.lewis wrote:The big difference though is that actually doing the set the htmlText into a 'real' field takes quite a few seconds (up to 10) whereas putting it into the templateField which is not displayed is close to instantaneous. And the put the text of the templateField into fld "output_fld" is similarly fast.