FlashTextEditor2 component does not have visual appearence when it is exported to swf file but it provides you with programming interface for controlling rich text format of the targeted text field

FlashTextEditor2 component panel parameters

Parameter

Description

cssFile Location of the CSS file.

linkColor

Color of the linked text(in case that is not defined inside CSS file)

targetBorderColor

Border color of the currently targeted text field.

targetTextField Name of the targeted text field.

undoLevels

Number of undo levels. Value of 0 will disable undo.

FlashTextEditor2 Properties

Property

Description

enabled

Indicates whether the component is active.

linkColor

Color of the linked text(in case that is not defined inside CSS file)

targetBorderColor

Border color of the currently targeted text field.

targetTextField*

Sets currently edited text field.

style

StyleSheet object of the text field.

cssFile

Location of the CSS file.

undoLevels

Number of undo levels. Value of 0 will disable undo.

toggleView

A Boolean value indicating whether the component is in HTML view(true) or not (false).

iniFormat

Initial text format of the targeted text field.

refocus

A Boolean value indicating whether the component should return focus after formatting is applied(true) or not (false).

target**

Target TextField or Flex TextArea.

FlashTextEditor2 Methods

Method

Description

getHTML Returns html string of the currently edited text field.

setHTML

Sets html text of the currently edited text field

toggleHTML

Toggles between normal and code view of the currently edited text field.

setStyle

Changes style of the currently selected text.

removeStyle

Removes style.

setFormat

Changes format of the currently selected text.

insertImage

Inserts image at the position of cursor.

removeImage

Removes the image.

removeLink

Removes the link.

getImages

Returns properties of the images used in currently edited text field.

getLinks

Returns properties of the links used in currently edited text field.

undo

Executes 'undo' action.

redo

Executes 'redo' action.

doLater*

Calls a function after a user-defined number of frames.

returnFocus

Return focus to the targeted text field.

insert

Inserts characters at the position of cursor.

FlashTextEditor2 Events

Event

Description

change Broadcast to all registered listeners when the html of the targeted text field is changed.

link

Broadcast to all registered listeners when link inside targeted text field is clicked.

styleInit

Broadcast to all registered listeners when StyleSheet for targeted text field is initialized.

selectionChange

Broadcast to all registered listeners when format of selected text is changed.

* - available only in ActionScript2 (FlashPlayer 8) version of FTE2
** - available only in ActionScript3 (Flash Player 9) version of FTE2