RichTextView
The RichTextView control is used to edit a text with formatting (also known as Rich Text Format).
The RichTextView inherits all the methods and properties from the base class View.
Constructor:
constructor(parent: View)
Creates an instance of RichTextView control.parent: the View containing the control itself.
Properties:
text: string
The rich text content to be edited in the view.path: string
The path of a file containing rich text content.caretX: number
Indicates the horizontal position of the caret in the client area of the RichTextView.caretY: number
Indicates the vertical position of the caret in the client area of the RichTextView.modified: boolean
Indicates whether the text is changed.readOnly: boolean
Indicates whether the control is in read-only mode. Default is false.toolbar: boolean
Indicates whether the toolbar is shown. Toolbar has the formatting tools you can use to style your text (font name, font size, font style, font color, etc). Default is false.statusbar: boolean
Indicates whether the statusbar is shown. Default is false.readOnly: boolean
Indicates whether the control is in read-only mode. Default is false.
Methods:
makeNewDocument(): void
Initializes the control with a new empty .rtf document.change(handler: ()=> any)
Registers an event handler that is triggered after the text in RichTextView is changed.save(handler: ()=> any)
Registers an event handler that is triggered after save button is the RichTextView toolbar is pressed.