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.

Reformating a portion of a text field

Featured Replies

I want to be able to highlight a portion of the text in a field and then run a script to change the text's color. Is there a way to do that?

Thanks

Sure. Something like:


If [ Get ( ActiveSelectionSize ) ] 

Insert Calculated Result [ TextColor ( Middle ( Get ( ActiveFieldContents ) ; Get ( ActiveSelectionStart ) ; Get ( ActiveSelectionSize ) ) ; RGB ( 240 ; 0 ; 0 ) ) ] 

Else 

Show Custom Dialog [ Message: "Select some text first."; Buttons: “OK” ] 

End If 

  • Author

That's works fine.

Now I need to be able to find text that is formatted as "strikethough" and delete it.

Thanks

That's a whole new ball game. Do you mean find the formatted text within the field, or find records containing formatted text?

  • Author

Find the text within a field.

For example the text might be

"The (test) examination is cancelled" assuming the word in parens is actually a strikethrough.

Once the script is run the text would be "The examination is cancelled."

Rich

That's going to take some work. I suggest you take a look at the GetAsSVG() function. If you direct your script to look for "text-decoration:line-through" in the StyleList branch of the result, you can then extract the Begin and End position indicators, and use them to "by-pass" the striked text. Since there can be more than one such section, your script (or custom function) needs to loop until the style cannot be found.

Now I need to be able to find text that is formatted as "strikethough" and delete it.

Hi

try this file to have an idea...

strikethough.zip

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.