Name

richtexteditarea

Synopsis

LZX: richtexteditarea
JavaScript: richtexteditarea
Type: Class
Access: public
Topic: Incubator.Rich Text Editor
Declared in: lps/components/incubator/rich-text/richtexteditarea.lzx

Description

A view which contains the text area for a rich text editor. Combine with a richtexttoolbar to make an actual editor.

Superclass Chain

richtexteditarea

Known Subclasses

Details

Properties (12)

currentformat
<attribute name="currentformat" />
public var currentformat;
The current format in which text should be added, and which the toolbar should reflect. Everyone interested in the current format should look at this attribute to see what it is.
defaultfontcolor
<attribute name="defaultfontcolor" value="0x000000" />
public var defaultfontcolor;
Default font color
defaultfontname
<attribute name="defaultfontname" type="string" value="Verdana" />
public var defaultfontname : String;
Default font name
defaultfontsize
<attribute name="defaultfontsize" type="number" value="11" />
public var defaultfontsize : Number;
Default size of text
editortype
<attribute name="editortype" type="string" value="flash-html" />
public var editortype : String;
Attribute indicating the type of HTML content produced by editor.
indentsize
<attribute name="indentsize" value="35" />
public var indentsize;
The size in points of an indent
insertionpoint
<attribute name="insertionpoint" value="0" />
public var insertionpoint;
The current index of the insertion point. Should be -1 if there's no insertion point.
isHTML
<attribute name="isHTML" value="false" />
public var isHTML;
Indicates whether there's formatting on the text contained by this editor.
linkpanel
<attribute name="linkpanel" value="$once{parent.parent.linkpanel}" />
public var linkpanel;
Reference to the hyperlink creation dialog
startformat
<attribute name="startformat" />
public var startformat;
toolbar
<attribute name="toolbar" value="$once{parent.parent.toolbar}" />
public var toolbar;
Reference to the toolbar associated with this editor.
toolbarplacement
<attribute name="toolbarplacement" value="null" />
public var toolbarplacement;
The placement for the toolbar in the richtexteditor.

Methods (7)

delegateInitSelection()
<method name="delegateInitSelection" />
public function delegateInitSelection();
Initialize the selection region on focus event
delegateRestoreSelection()
<method name="delegateRestoreSelection" />
public function delegateRestoreSelection();
Restore the selection region, but do it in the next "frame." This is necessary because Flash is frame-based and can't handle certain selection changes in a single "frame."
reset()
<method name="reset" />
public function reset();
Reset the values of the richtexteditor.
saveSelectionRegion()
<method name="saveSelectionRegion" />
public function saveSelectionRegion();
Save selected region.
setCurrentFormat()
<method name="setCurrentFormat" args="fmt, inCaretMove" />
public function setCurrentFormat(fmt : textformat, inCaretMove : boolean);
Change the format of the selection by attributes contained in TextFormat object.
setFormatAttribute()
<method name="setFormatAttribute" args="attr, val" />
public function setFormatAttribute(attr : string, val : string);
Change the format of the selection by just one attribute. This allows the selection to keep non-uniform formats on attributes which are not being adjusted. That is: select "pear, cherry", where pear is green and cherry is red. Change the font to helvetica using the combo box. Now it's all helvetica, but pear is still green and cherry is still red. If no text is currently selected, format the insertion point. This handles character formatting only. Not paragraph formatting. See setParagraphAttribute.
setSelection()
<method name="setSelection" args="ns, ne" />
public function setSelection(ns, ne);

LZX Synopsis

<class name="richtexteditarea">
  <attribute name=" currentformat " />
  <attribute name=" defaultfontcolor " value="0x000000" />
  <attribute name=" defaultfontname " type="string" value="Verdana" />
  <attribute name=" defaultfontsize " type="number" value="11" />
  <attribute name=" editortype " type="string" value="flash-html" />
  <attribute name=" indentsize " value="35" />
  <attribute name=" insertionpoint " value="0" />
  <attribute name=" isHTML " value="false" />
  <attribute name=" linkpanel " value="$once{parent.parent.linkpanel}" />
  <attribute name=" startformat " />
  <attribute name=" toolbar " value="$once{parent.parent.toolbar}" />
  <attribute name=" toolbarplacement " value="null" />
  <method name=" delegateInitSelection " />
  <method name=" delegateRestoreSelection " />
  <method name=" reset " />
  <method name=" saveSelectionRegion " />
  <method name=" setCurrentFormat " args="fmt, inCaretMove" />
  <method name=" setFormatAttribute " args="attr, val" />
  <method name=" setSelection " args="ns, ne" />
</class>

JavaScript Synopsis

public richtexteditarea {
  public var currentformat ;
  public var defaultfontcolor ;
  public var defaultfontname  : String;
  public var defaultfontsize  : Number;
  public var editortype  : String;
  public var indentsize ;
  public var insertionpoint ;
  public var isHTML ;
  public var linkpanel ;
  public var startformat ;
  public var toolbar ;
  public var toolbarplacement ;
  prototype public function delegateInitSelection ();
  prototype public function delegateRestoreSelection ();
  prototype public function reset ();
  prototype public function saveSelectionRegion ();
  prototype public function setCurrentFormat (fmt : textformat, inCaretMove : boolean);
  prototype public function setFormatAttribute (attr : string, val : string);
  prototype public function setSelection (ns, ne);
}