How to line break/return with <br/> in LC
Posted: Tue Feb 09, 2021 1:59 pm
I've put together a simple utility in LC which will export a tsv file so that it can then be imported into a flashcard application.
So far so good, I learnt yesterday evening how to successfully export a tsv from LC (with much sense of achievement as I put the GUI and code together in less than an hour!) and I was then able to successfully import the resulting file into the flashcard app... however, it only imports as long as there is only a single line of text, ie no line breaks or returns.
It seems that the flashcard app requires any line breaks to be identified with the '<br/>' code as below.
'Creating Line Breaks in Imported Decks: Anywhere that you would like to have a line break occur in the resulting deck, include this text '<br/>' in your CSV/TSV file'
I therefore tried to accommodate this with:
However, the flashcard app says the resulting text is invalid and refuses to import it.
Not sure whether this is a LC issue in terms of the code that it uses for line breaks/returns or whether its the flashcard app's issue.
Superficially I'm thinking that it doesn't seem to like the code that LC is using for line break/return and was assuming that if I can replace the code that LC uses for line breaks/returns with <br/> then it will import!?
I was therefore wondering if it is therefore possible to replace the code LC is using for a line break/return with a <br/> instead?
Grateful for any thoughts/advice,
Regards,
Glenn
So far so good, I learnt yesterday evening how to successfully export a tsv from LC (with much sense of achievement as I put the GUI and code together in less than an hour!) and I was then able to successfully import the resulting file into the flashcard app... however, it only imports as long as there is only a single line of text, ie no line breaks or returns.
It seems that the flashcard app requires any line breaks to be identified with the '<br/>' code as below.
'Creating Line Breaks in Imported Decks: Anywhere that you would like to have a line break occur in the resulting deck, include this text '<br/>' in your CSV/TSV file'
I therefore tried to accommodate this with:
Code: Select all
on returninfield
put "<br/>" & return after field 1
-- omitting the '& return' doesn't help either!
end returninfield
Not sure whether this is a LC issue in terms of the code that it uses for line breaks/returns or whether its the flashcard app's issue.
Superficially I'm thinking that it doesn't seem to like the code that LC is using for line break/return and was assuming that if I can replace the code that LC uses for line breaks/returns with <br/> then it will import!?
I was therefore wondering if it is therefore possible to replace the code LC is using for a line break/return with a <br/> instead?
Grateful for any thoughts/advice,
Regards,
Glenn