Extracting long text fields, rich text, carriage returns etc
Posted: 30 Mar 2022 14:13
Hi again - another API question...
I've had some fun trying to figure out how to extract long text fields, e.g. Notes or Text from Source, with all the html formatting in tact (or with known control char behaviour). These can either be rich text/embedded html or plain text with/without carriage returns.
Using fhGetItemText or fhGetDisplayText I seem to get cropped versions with all the paragraphs munged into a single unformatted text sentence.
This might be a LUA string handling artefact or the way the FH API returns the data in the way I've been using it.
Do you have to use the GetParagraph function ? What if a para is too long for the API ?
Can anyone provide a snippet of how it should be done please!
Thanks in anticipation!
Cheers
Paul
I've had some fun trying to figure out how to extract long text fields, e.g. Notes or Text from Source, with all the html formatting in tact (or with known control char behaviour). These can either be rich text/embedded html or plain text with/without carriage returns.
Using fhGetItemText or fhGetDisplayText I seem to get cropped versions with all the paragraphs munged into a single unformatted text sentence.
This might be a LUA string handling artefact or the way the FH API returns the data in the way I've been using it.
Do you have to use the GetParagraph function ? What if a para is too long for the API ?
Can anyone provide a snippet of how it should be done please!
Thanks in anticipation!
Cheers
Paul