NetTalk Central

Author Topic: Convert text to HTML text for display  (Read 2443 times)

JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Convert text to HTML text for display
« on: September 26, 2024, 02:59:16 AM »

Hi,

If I have a block of text containing all sorts, multiple spaces , quotes etc,
Is there a stringtheory or NTWS function that can be used to to convert that text to display correctly within an HTML document

I am constructing a block of HTML and this text will be included inside <p> tags

thanks

Johan


osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: Convert text to HTML text for display
« Reply #1 on: September 26, 2024, 03:07:14 AM »
if you use text field then check Allow xhtml and Allow UNSAFE Html

JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Re: Convert text to HTML text for display
« Reply #2 on: September 26, 2024, 03:16:12 AM »

Hi,

Thanks, however, I am not displaying / loading this via a NTWS field.
 
I am constructing an HTML file by adding dynamic text to it, and then the server will display a static file.


thanks

Johan




osquiabro

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
    • Email
Re: Convert text to HTML text for display
« Reply #3 on: September 26, 2024, 04:18:54 AM »
Use the display field, Display tab and then in source select file tag <!--Net: F, or as Bruce says post example  :D

JohanR

  • Sr. Member
  • ****
  • Posts: 375
    • View Profile
    • Email
Re: Convert text to HTML text for display
« Reply #4 on: September 26, 2024, 06:32:07 AM »
Hi,

Thanks for your help,
but think I was barking up the wrong tree, something I do way too often nowadays!

Something else is breaking my HTML page

cheers,

Johan


 

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Convert text to HTML text for display
« Reply #5 on: October 03, 2024, 07:48:20 AM »
if you have a bunch of plain text, and you surround it with
<pre>


</pre>

Then I think you'll get what you;re looking for.

Cheers
Bruce