CTextBrowser
Read-only rich-text viewer built on CTextEdit's shared rich-text engine. CTextEdit owns the document, HTML parsing/serialization, layout, painting and formatted hit testing. CTextBrowser adds only permanent read-only behaviour and hyperlink interaction. Implements the text browser widget.
import { CTextBrowser } from "canvas-toolkit-lib";Declared members
readonly anchorClicked: CSignal<[string]>;Public anchor clicked member.
constructor(parent?: CWidget | null);Creates a new instance.
setReadOnly(_readOnly?: boolean): void;Sets the read only.
cursor(): CCursorShape;Provides cursor behavior.
setPlainText(text: string): void;Sets the plain text.
setHtml(html: string): void;Sets the html.
toHtml(): string;Provides to html behavior.
clear(): void;Clears the current contents.
canUndo(): boolean;Returns whether undo is currently possible.
canRedo(): boolean;Returns whether redo is currently possible.
undo(): void;Provides undo behavior.
redo(): void;Provides redo behavior.
handleMousePress(event: CMouseEvent): void;Provides handle mouse press behavior.
handleMouseMove(event: CMouseEvent): void;Provides handle mouse move behavior.
handleMouseRelease(event: CMouseEvent): void;Provides handle mouse release behavior.