When the FlashTextEditor is attached to a textfield (by setting the targetTextField property) it automatically parses the htmlText string of the textfield, substituting all real hyperlinks with temporary values. These values are asfunction protocol calls that cause the pop-up windows to appear in which the user can edit the properties of the hyperlinks.
For this reason, in order to retrieve the htmlText value of the currently edited text field, you should always use the components' getHTML method, instead of the textfield's htmlText property. Also, in order to replace the HTML of the currently edited textfield, you should use the component's setHTML method.
This is an example as to how the real HTML should look:
<A HREF="http://www.google.com" TARGET="_blank">Google</A>This is how the same HTML code may look while editing:
<A HREF="asfunction:_level0.fte.popUp,url,0" TARGET="">Google</A>Therefore, the correct way to get and set the htmlText value of the currently edited textfield is by using the getHTML and setHTML component methods.
The same applies if you are working with images (or swfs).
The FlashTextEditor controls are created using the standard Macromedia components. Targeting the controls is simple. For example, to change the font list that is displayed to the user you would use the following code:
fte.getControl("font").dataProvider = ["_sans","_serif","_typewriter"];
To disable the "Bold" button you would use:
fte.getControl("bold").enabled = false;
See also
You can create your own control button icons to use instead of standard ones. Here's how you would do this:
1. Create movieclips with graphics for each icon.
2. Right click on the movieclips that you just created in the library and select 'Linkage...'. Click on 'Export for ActionScript' in the 'Linkage Properties' dialog window and give the movie clips an Identifier name with same prefix (e.g. myFTEIcons).
For example, after creating movieclip icons for bold, italic and underline, you would set their identifier names to myFTEIcons_bold, myFTEIcons_italic and myFTEIcons_underline.
3. Go to the 'Component Inspector' panel and set the 'iconPrefix' property value to be the prefix value that you set for each icon, e.g. myFTEIcons
After exporting the swf, you should see your own icons instead of the standard icons.