Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Text field to html

Featured Replies

Hi,

I have a text field that I'd like to turn into an html document. What's the best way to do this with a script?

Thanks,

Dan

Best way: use xml export and xsl stylesheet.

Easier way:

make a calcfield ("<HTML><TITLE>" &External(WebToHMTL; title) & "</TITLE><BODY>" & External(WebToHMTL; bodytext) & "</BODY></HTML>",

export this field as tab-delimited text as C:tempexport.html

or Macintosh HD:temp:export.html.

Then rename this file with applescript, a WSH-Script or a Windows batch file.

  • Author

Thanks for the suggestions, cjaeger, but I can't seem to get this to work. I don't think I was being clear enough.

I don't have a text field that I want to have appear in an HTML page. What I have is a text field that is already raw html code (with a bunch of javascript thrown in for good measure). If I simply copy the field contents, paste them into a text file, and save it with a .htm extension, then it runs fine from a browser window. But if I try to export the field contents, saving it as a tab-delimited text file with an .htm extension, it doesn't work. None of the line breaks in the code come out right, and it gets pretty wonky in general.

I'd like to use the xml export to accomplish this. Where can I get a style sheet? If I can't do that, can I still use the calcfield method? Am I missing something?

Thanks,

Dan

try an export calc field =replace(Html_field;"q|";"") and export it.

This will strip any "q|" (return) characters from the file. They are not needed by the browser to display HTML (though they might be needed for some javascripts).

just give it a try.

or see this thread (and my attachment there)

http://www.fmforums.com/threads/showflat.php?Cat=&Board=UBB28&Number=64233

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.