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.

Featured Replies

Hello - Im looking for solution to this problem:

If [text style of selection = X ] then A else B.

There does not seem to be an obvious way to get text style of selection. So I tried this workaround:

If ( TextStyleAdd ( Middle ( Get ( ActiveFieldContents ) ; Get ( ActiveSelectionStart ) ; Get ( ActiveSelectionSize ) ) ; HighlightYellow ) ; "1"; "0")

thinking that if the selection is styled as in the TextStyleAdd expression then it would evaluate as TRUE but it doesn't work.

Is there any way?

Thanks. 

21 minutes ago, Asu said:

There does not seem to be an obvious way to get text style of selection.

This is a trick question, because a selection can have multiple styles, and each substring within the selection can have a different combination of styles.

The two functions that can provide the answer are GetAsCSS() and GetAsSVG(). Both return the input text split into SPAN elements according to the style/s applied to each substring. If any substring of text is formatted as HighlightYellow, then both GetAsCSS ( text ) and GetAsSVG ( text ) will contain the pattern:

background-color: #FFFF00;

See also:
https://www.briandunning.com/cf/1611

 

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.