ETextEditor Text editor
Examples
Rich text and formatting
Read-only content
Hidden toolbar
Selected text format
Placeholder and paste
Properties
PropertyDescriptionValues and default
showToolbarboolShow the rich text formatting toolbar.
Default
truetextaliasQt RichText HTML content of the editor.
Default
editor.textplaceholderTextstringPlaceholder shown when the value is empty.
Default
""readOnlyaliasKeep content visible and prevent edits.
Default
editor.readOnlyeditoraliasRead onlyUnderlying TextEdit instance.
Default
editorcanRedoboolRead onlyWhether an edit can be redone.
Default
editor.canRedocanUndoboolRead onlyWhether an edit can be undone.
Default
editor.canUndoplainTextstringRead onlyPlain text representation of the rich content.
Default
editor.getText(0, editor.length)currentFormatvarRead onlyCharacter formatting and paragraph alignment at the cursor.
Default
Show default value
{ const position = editor.cursorPosition const revision = state.revision return document.formatAt(position) }Signals
SignaturePurpose
formatApplied(string operation)Emitted after applying text formatting; operation identifies the formatting action.
Methods
SignaturePurpose
redo()Redo an undone text edit.
undo()Undo the last text edit.
applyFormat(operation, value)Apply formatting operation with value to the selected text; return whether it succeeds.