TTMSFNCRichEditor Class
A rich text editor that supports formatted text, images, hyperlinks, and clipboard and drag-and-drop interchange.
API unit family: TMSFNCRichEditor
Inherits from: TTMSFNCRichEditorBase
Implements: ITMSFNCCustomEditor
Syntax
TTMSFNCRichEditor = class(TTMSFNCRichEditorBase, ITMSFNCCustomEditor)
Properties
Name
Description
AllowSelect
Determines whether the user can select content in the editor with the mouse or keyboard. True allows selection; defaults to True.
BitmapContainer
The container that supplies the named pictures referenced by the content.
CaretTimer
The timer that drives the blinking caret.
ClipboardFormats
The set of clipboard formats the editor offers or accepts when copying and pasting. Defaults to all supported formats (RTE, RTF, plain text, HTML, file, and bitmap).
ContextMenu
The context menu shown on a right-click, built and populated internally by the editor.
Emoticons
The container that supplies the bitmaps used to render emoticons in the content.
GraphicSelection
The appearance (color and border color) used to highlight a selected graphic element.
PopupToolBar
The popup shown near the caret or selection, such as a mini formatting toolbar.
SingleLine
Determines whether the editor is restricted to a single line of text. True disables line breaks and multi-line layout; defaults to False.
ToolBarPopup
The toolbar popup linked to this editor, hosting its formatting toolbar.
Version
The version number of the editor implementation, formatted as major.minor.release.build.
Methods
Name
Description
AddToolBar
Registers a toolbar so it is notified whenever the editor's formatting state changes.
CalcHeight
Calculates the height required to render the content within a given width.
ClipboardHasContent
Determines whether the clipboard currently holds content in a format the editor can paste.
CopyFormattedSelectionToClipboard
Copies the current selection to the clipboard using the formats enabled in ClipboardFormats.
CopyHTMLToClipboard
Copies the selected content to the clipboard as HTML.
CopyRTFToClipboard
Copies the selected content to the clipboard as RTF.
CopyToClipboard
Copies the current selection to the clipboard using the formats enabled in ClipboardFormats.
CutToClipboard
Removes the current selection and copies it to the clipboard.
PaintTo
Paints the content to an arbitrary canvas and rectangle, for example to render a preview or a custom print page.
PasteFormattedSelectionFromClipboard
Pastes formatted content from the clipboard, replacing the current selection.
PasteFromClipboard
Pastes the clipboard content, replacing the current selection.
Print
Prints the content using the current print settings.
RemoveToolBar
Unregisters a toolbar that was previously added with AddToolBar.
Events
Name
Description
OnAutoComplete
Occurs while auto-completion is evaluating the word being typed, letting the handler supply the completion text.
OnBeforePopupMenu
Occurs before the built-in context menu is shown, letting the handler customize its entries.
OnCanSelectGraphic
Occurs when a graphic element is about to be selected, letting the handler reject the selection.
OnCanSizeGraphic
Occurs when a graphic element is about to be resized, letting the handler reject the resize.
OnClickGraphic
Occurs when a graphic element in the content is clicked.
OnClickHyperlink
Occurs when a hyperlink in the content is clicked.
OnContextForWord
Occurs when the context menu is requested over a word, letting the handler supply custom handling for that word.
OnDrawBackground
Occurs when the background of the content area needs to be painted, letting the handler draw a custom background.
OnDrawGraphic
Occurs when a custom graphic element needs to be painted, letting the handler draw its content.
OnDropFile
Occurs when a file is dropped onto the content, letting the handler allow or reject the drop.
OnDropImage
Occurs when an image is dropped onto the content, letting the handler allow or reject the drop.
OnGetElementHint
Occurs when the hint text for an element under the pointer is requested, letting the handler customize the hint.
OnImageNotFound
Occurs when a named picture referenced by the content cannot be resolved, letting the handler supply a replacement picture name.
OnPasteBitmap
Occurs when a bitmap is about to be pasted from the clipboard, letting the handler allow or reject the paste.
OnPasteFormattedText
Occurs when formatted text is about to be pasted from the clipboard, giving the handler access to the raw content stream.
OnPasteText
Occurs when plain text is about to be pasted from the clipboard, letting the handler modify or reject the text.
Used by