Compound Rich Text Interactions

advanced-prototyping

#1

I am using an OnClick event to Set Text and apply rich text options to a box. For example, I have a “Bold” button, and a target box object. When clicking my button, I can set the text of the target box to be the value of a global variable, and I can set the rich text style of that text to be bold.

The trouble comes when I add more rich text buttons, such as “Italic”. The OnClick event will set the rich text style of the target box to italic as expected. But, I can only set the text to bold OR italic, but not bold AND italic because the second interaction does not retain the styles applied by the first interaction.

When you consider the options of font, font style, font size, font color, bullet style, and text alignment, it becomes clear that setting variables to check for every permutation of these rich text options is impractical.

Is there a way to make compound rich text styles on events? And can these options be persistent?


#2

Short answer - not easily. In the past I’ve accomplished this using some javascript to dynamically build a style and apply it to the object. Can be done but takes a bit of work.


closed #3

unlisted #4