Jump to content

Text Formatting Interface Examples or Tutorials?


This topic is 2559 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi all. I am about to start building a user interface to provide text formatting functionality whereby users can format text using buttons I have provided such as Bold, Italic, and so on. Basically buttons for all the text formatting functions FileMaker provides. I specifically need the ability for users to be able to highlight text within a block of text in a text field and add formatting to the highlighted text. Can anyone recommend a source with some examples or video tutorials on how to accomplish this.

Thanks in advance :)

Link to comment
Share on other sites

Is there any way to detect if formatting is already applied? For instance, if highlighted text is already bold I would like to be able to unbold the text? Trying to approximate known text editing behavior as much as possible.

Link to comment
Share on other sites

Thanks Comment. I was able to use GtAsCSS to detect styling. I'm experiencing a strange behavior now though. When I apply a text style using

TextStyleAdd ( Middle ( Get ( ActiveFieldContents ) ; Get ( ActiveSelectionStart ) ; Get ( ActiveSelectionSize ) ) ; Bold )

the highlighted text becomes Bold as desired. Then with the same newly bold text highlighted and using

TextStyleRemove ( Middle ( Get ( ActiveFieldContents ) ; Get ( ActiveSelectionStart ) ; Get ( ActiveSelectionSize ) ) ; Bold )

The Bold styling is not removed. However if I select the same text and include one or more preceding unbolded characters it then removes the Bold style.

Link to comment
Share on other sites

This topic is 2559 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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