Jump 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.

Getting GetASCSS() to properly interpret tab characters?

Featured Replies

So I want to export a text field to a website. The text field has many, many tab characters to set up alignment of lists, indented paragraphs, etc. However, it appears as though GetAsCSS() completely ignores them. However, I know GetAsCSS() sees them, because when I tried to Substitute() them with an html entity, the text becomes full of "&tab;" or "  ..." or whatever. Does anyone have any solutions about how to handle this? I haven't been able to find anything. Any ideas are appreciated.

However, it appears as though GetAsCSS() completely ignores them.

 

What makes you think that? What does GetAsCSS() return for a field that contains tabs?

  • Author

Perhaps what you mean is that the browser rendering the resulting HTML ignores them. Which is the correct thing to do, since by default HTML "collapses" any sequence of white-space characters into a single space. See, for example:

http://webdesign.about.com/od/styleproperties/p/blspwhitespace.htm

http://webdesign.about.com/od/intermediatetutorials/qt/tiphtmltab.htm

I know, but I want to force it not to do that. So if I could make it understand &tab; or something, that would be ideal.

If you're trying to apply HTML and CSS maybe it's time to learn HTML and CSS.

 

You may want to consider learning about tables.

by default HTML "collapses" any sequence of white-space characters into a single space.

 

I know, but I want to force it not to do that.

 

The way to force the browser to respect white-space characters literally, is to use the <pre> tag.

 

Note that the purpose of GetAsCSS() is to preserve text styles  (bold, italic, color, etc.) not the field's overall formatting. I am not sure why you have "many, many tab characters to set up alignment of lists, indented paragraphs, etc." all in a single text field. It sounds like you could benefit from splitting the data into individual fields. Also, if you are serious about publishing the data on the web, consider exporting it as XML and use XSLT to create the HTML document with all the necessary HTML/CSS bells and whistles. Transforming your text field - formatted (I presume) to display correctly in Filemaker - to a web page as-is, with no further adjustments. is not likely to produce the best result.

  • Author

The way to force the browser to respect white-space characters literally, is to use the <pre> tag.

 

Note that the purpose of GetAsCSS() is to preserve text styles  (bold, italic, color, etc.) not the field's overall formatting. I am not sure why you have "many, many tab characters to set up alignment of lists, indented paragraphs, etc." all in a single text field. It sounds like you could benefit from splitting the data into individual fields. Also, if you are serious about publishing the data on the web, consider exporting it as XML and use XSLT to create the HTML document with all the necessary HTML/CSS bells and whistles. Transforming your text field - formatted (I presume) to display correctly in Filemaker - to a web page as-is, with no further adjustments. is not likely to produce the best result.

 

That is so helpful, thank you! The reason there are so many indented lists is because it's a policy handbook.

it's a policy handbook

 

Have you considered publishing it as PDF?

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.