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

Text formatting question

Featured Replies

Hi everyone,

I am trying to highlight certain words in a text field. The idea is that the user will type a word into a global field and that word will be highlighted in the text. I am trying to make the word capitalized, bold and change colors. This is the script I have.

Case(

PatternCount(Lower(Contents);Lower(xFind));

Substitute(Lower(Contents);Lower(xFind);

TextStyleAdd(TextColor(Upper(xFind);RGB(128 ; 0 ; 128));Bold));Contents)

I am using the lower function so the user doesn't have to know if the word is upper lower or proper, they can enter "word" and it will find "word" "WORD" or "Word". The problem is, that although it will find all the words regardless of case, it capitalizes the found word but makes all the rest of the text lower case. If I take out the lower function then if the user types in "word" it will only find "word" not "WORD" or "Word". So how can I change my calc so only the searched word is affected? Any help would be greatly appreciated, I am running out of hair from pulling it out.

Thanks

Mike

Take your pick:

http://www.briandunning.com/cf/13

http://www.briandunning.com/cf/578

http://www.briandunning.com/cf/579

  • Author

Thanks comment. Those really helped. One question though. Is there a way to only get a full word? All of those found a string of text even if it was not the whole word. For example if I typed in "not" it would hilite every occurance regardless of case (yea!) but it also hilited the "not" in nothing, note knot or notorious. anyway to limit it to just the whole word? Hope I am not being too picky. Thanks again

Mike

Create an account or sign in to comment

Important Information

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

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.