Page 1 of 1

Line breaks in Description Field through script

Posted: 2002-07-27 09:06:35
by bmm
Hi

Is it possible to create "line breaks" (like saying /n or something) in the Description and Comments Field through a script?

I want to convert <p> and <br> to line breaks, so that text in paragraphs on a webpage doesn't end up as one long paragraph in AMC.

Posted: 2002-07-27 09:25:23
by antp
in the code the linebreak is the ASCII value of the character, so newline & carriage return :

Code: Select all

value := atext + #13#10 + anothertext
If you want to replace the <p> and <br> you can do this :

Code: Select all

value := StringReplace(value, '<br>', #13#10);
value := StringReplace(value, '<p>', #13#10#13#10);
(here you'll get an double line break for <p> tag)

Posted: 2002-07-27 09:41:32
by bmm
Thanks for the quick answer. It works exactly as it should. :grinking: