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.

Inserting styled text

Featured Replies

  • Newbies

Hi- first time poster. I'm an editorial assistant at a publishing house, and I'm working on scripting a database where one of the fields contains what is generally a very long string of text and various editors look over each record and insert some HTML code linking it to other records. Now, I've done some scripting so that they merely have to select the text they want linked, and click a button, and the HTML code from the other record will be automatically inserted if it matches the title of another record. The thing they want, though, is for this inserted text to be bold and red. Is there any way to do that?(I know once you start calculations, the formatting gets thrown out.)

Thanks for your help,

David Rothschild

There's no direct way to do this. There are two options, but one of them is Mac only, I'm afraid. There's a plug-in called Styler which adds this functionality. Check out this web site:

http://www.fmplugins.com/action.lasso?-database=plugins.fp3&-layout=main&-response=plugindetail.html&-recid=92&-token.did=&-search

The other solution is a workaround to the fact that you can't script the changing of text formating within a field. It does have some limitations, but it should work.

Basically, you create two fields, one that the user enters data into, and another that provides formatting for some of the text.

Place your field Text on the layout and create a second field called Text_Format that is on top of the Text field. Make Text_Format so that it doesn't allow user entry. This way when the user clicks on it, they will be taken to the Text field underneath. Text_Format is formatted in the way you want, such as having all the text be red.

Let's say that Text has the following string:

"Thank God it's Friday."

Your user highlights "God" and wants to set it to be red. You need two additional fields: gText_To_Format holds the text highlighted and Spaces is a global text field that has enought spaces so that you can insert as many as you like. Here's the script:

Copy []

Paste [ select, gText_To_Format ]

Set Field [ Text_Format, Left( Spaces, Postion( Text, gText_To_Format, 1, 1 ) - 1 ) & gText_To_Format ]

Here's a major limitation. You have to use a monospaced font such as Courier, or the number of spaces that you insert won't be the same vertical length as the text you don't have formatted.

Also, the script I have above will only allow one area of text to have the formatting. But the idea could be altered to allow more. I'm just doing this off the top of my head. I'm sure that others have perfected the technique beyond this.

Chuck

David, couldn't you use HTML formatting in a field?

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.