There are two functions that deal with "selection" (selected text):
Combine those values with the functions:
to give you a "place" to add the
on the "selection"
An example script (which could be attached to a button would set the "selection" to BOLD):
This is quick and dirty but one script could get passed parameters from several buttons to set other 'formatting" functions.
The Substitute() function can work on a small section of text, We have collected the actual dimensions of the selection with the Start and Size and plugged them into the Middle() of the full text. That way we are ONLY changing that small section and not the entire field.
Study all the functions in the above links.
View -> formatting bar.
Yes the formatting bar is handy, but that wasn't the question. I had a client that needed a "few buttons" and scripted is the way. The functions I sited change just the selection.
I *do* train my users how to use the formatting bar for more options.
Sorry Bev, but when you have a text field with some text in it, clicking on elements of the formatting bar also change just the selection you made in the text field.
It's a shame that there's no script step allowing us to show the formatting bar, but that's typical FM.
Beverly, thank you for your excellent response. I'll give this a try. This technique will save a few steps when taking notes in FMP and also promote consistency among users in how the notes appear.
agreed the formatting bar does what it should on "the selection". but sometimes you want to LIMIT user formatting, too.