• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How do highlighted-text stays highlighted when the it is out of focus?

New Here ,
Jul 11, 2012 Jul 11, 2012

Copy link to clipboard

Copied

Hi all,

I am currently having a dificulty in getting my custom-made Flex 3 RichText based on TLF 3.0 to work correctly.

If you look at the "TLF Editor (Advanced)" in Tour De Flex, whenever you highlight the text and then hit one of the text-styling buttons, for example bold, the text will be bolded, as expected, and the highlight stays.

My custom RichText has the same setup: left pane is the text editor and right pane is the text-styling-UI buttons.

The difficulty that I got is getting the text stays highlighted when the user hits one of the text-styling-UI buttons.

I just couldn't figure out how the text could stays highlighted in  "TLF Editor (Advanced)"  example.

I actually got the "TLF Editor (Advanced)" code and got it to run on Flex Builder 4 but I still couldn't figure out what made the highlight stays.

I appreciate any input on this.

Again, I am building a Flex 3 RichText component based on TLF 3.0.

And I am using Flex SDK: 3.6.

Handi

TOPICS
Text layout framework

Views

6.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 12, 2012 Jul 12, 2012

Copy link to clipboard

Copied

Could you please paste here the handler (just the key part) of highlight and text-styling button? Those handlers will show how new format is applied or appended.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 12, 2012 Jul 12, 2012

Copy link to clipboard

Copied

Hi Jin Huang,

I am not sure that I understand on the handler for the highlight. I am using whatever the default is by the textLayout framework.

For the text-styling, here's an example:

var pa:TextLayoutFormat = new TextLayoutFormat();

pa["fontWeight"] = "bold";

(_textFlow.interactionManager as EditManager).applyParagraphFormat(pa);

Appreciate your help Jin Huang.

Handi

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 12, 2012 Jul 12, 2012

Copy link to clipboard

Copied

LATEST

Actually, I accidentaly stumbled the solution.

I just need to mess around with TextFlow.defaultConfiguration.

Problem solved!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines