RichEditTextDocument
RichEditTextDocument
RichEditTextDocument
RichEditTextDocument
Class
Definition
Represents a rich text document that can be loaded, saved, and edited.
public : sealed class RichEditTextDocument : ITextDocument, ITextDocument2public sealed class RichEditTextDocument : ITextDocument, ITextDocument2Public NotInheritable Class RichEditTextDocument Implements ITextDocument, ITextDocument2// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 Creators Update (introduced v10.0.15063.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v4)
|
Properties
AlignmentIncludesTrailingWhitespace AlignmentIncludesTrailingWhitespace AlignmentIncludesTrailingWhitespace AlignmentIncludesTrailingWhitespace
Gets or sets a value that indicates whether trailing white space is taken into account when text is aligned.
public : PlatForm::Boolean AlignmentIncludesTrailingWhitespace { get; set; }public bool AlignmentIncludesTrailingWhitespace { get; set; }Public ReadWrite Property AlignmentIncludesTrailingWhitespace As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
true if trailing whitespace is taken into account when text is aligned; false if trailing whitespace is ignored. The default is false.
DefaultTabStop DefaultTabStop DefaultTabStop DefaultTabStop
Gets or sets the default tab spacing.
public : float DefaultTabStop { get; set; }public float DefaultTabStop { get; set; }Public ReadWrite Property DefaultTabStop As float// You can use this property in JavaScript.
- Value
- float float float float
The default tab spacing.
IgnoreTrailingCharacterSpacing IgnoreTrailingCharacterSpacing IgnoreTrailingCharacterSpacing IgnoreTrailingCharacterSpacing
Gets or sets a value that indicates whether character spacing is applied to the last character in a line.
public : PlatForm::Boolean IgnoreTrailingCharacterSpacing { get; set; }public bool IgnoreTrailingCharacterSpacing { get; set; }Public ReadWrite Property IgnoreTrailingCharacterSpacing As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
true if spacing is applied to the last character in a line of text; otherwise, false. The default is false.
Selection Selection Selection Selection
Gets the active text selection.
public : ITextSelection Selection { get; }public ITextSelection Selection { get; }Public ReadOnly Property Selection As ITextSelection// You can use this property in JavaScript.
The active text selection.
UndoLimit UndoLimit UndoLimit UndoLimit
Gets or sets the maximum number of actions that can be stored in the undo queue.
public : unsigned int UndoLimit { get; set; }public uint UndoLimit { get; set; }Public ReadWrite Property UndoLimit As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The maximum number of undo actions.
Methods
ApplyDisplayUpdates() ApplyDisplayUpdates() ApplyDisplayUpdates() ApplyDisplayUpdates()
Decrements an internal counter that controls whether text updates are displayed immediately or batched.
public : int ApplyDisplayUpdates()public int ApplyDisplayUpdates()Public Function ApplyDisplayUpdates() As int// You can use this method in JavaScript.
The value of the internal counter.
BatchDisplayUpdates() BatchDisplayUpdates() BatchDisplayUpdates() BatchDisplayUpdates()
Increments an internal counter that controls whether text updates are displayed immediately or batched.
public : int BatchDisplayUpdates()public int BatchDisplayUpdates()Public Function BatchDisplayUpdates() As int// You can use this method in JavaScript.
The value of the internal counter.
BeginUndoGroup() BeginUndoGroup() BeginUndoGroup() BeginUndoGroup()
Turns on undo grouping.
public : void BeginUndoGroup()public void BeginUndoGroup()Public Function BeginUndoGroup() As void// You can use this method in JavaScript.
CanCopy() CanCopy() CanCopy() CanCopy()
Determines whether document content can be copied to the Clipboard.
public : PlatForm::Boolean CanCopy()public bool CanCopy()Public Function CanCopy() As bool// You can use this method in JavaScript.
true if copying to the Clipboard is allowed; otherwise, false.
CanPaste() CanPaste() CanPaste() CanPaste()
Determines whether the Clipboard has content that can be pasted into the document.
public : PlatForm::Boolean CanPaste()public bool CanPaste()Public Function CanPaste() As bool// You can use this method in JavaScript.
true if the Clipboard has content that can be pasted into the document; otherwise, false.
CanRedo() CanRedo() CanRedo() CanRedo()
Determines whether one or more redo operations exist.
public : PlatForm::Boolean CanRedo()public bool CanRedo()Public Function CanRedo() As bool// You can use this method in JavaScript.
true if one or more redo operations exist; otherwise, false.
CanUndo() CanUndo() CanUndo() CanUndo()
Determines whether one or more undo operations exist.
public : PlatForm::Boolean CanUndo()public bool CanUndo()Public Function CanUndo() As bool// You can use this method in JavaScript.
true if one or more undo operations exist; otherwise, false.
EndUndoGroup() EndUndoGroup() EndUndoGroup() EndUndoGroup()
Turns off undo grouping.
public : void EndUndoGroup()public void EndUndoGroup()Public Function EndUndoGroup() As void// You can use this method in JavaScript.
GetDefaultCharacterFormat() GetDefaultCharacterFormat() GetDefaultCharacterFormat() GetDefaultCharacterFormat()
Retrieves the default character formatting attributes of the document.
public : ITextCharacterFormat GetDefaultCharacterFormat()public ITextCharacterFormat GetDefaultCharacterFormat()Public Function GetDefaultCharacterFormat() As ITextCharacterFormat// You can use this method in JavaScript.
The default character formatting attributes.
GetDefaultParagraphFormat() GetDefaultParagraphFormat() GetDefaultParagraphFormat() GetDefaultParagraphFormat()
Retrieves the default paragraph formatting attributes of the document.
public : ITextParagraphFormat GetDefaultParagraphFormat()public ITextParagraphFormat GetDefaultParagraphFormat()Public Function GetDefaultParagraphFormat() As ITextParagraphFormat// You can use this method in JavaScript.
The default paragraph formatting attributes.
GetRange(Int32, Int32) GetRange(Int32, Int32) GetRange(Int32, Int32) GetRange(Int32, Int32)
Retrieves a new text range for the active story of the document.
public : ITextRange GetRange(int startPosition, int endPosition)public ITextRange GetRange(Int32 startPosition, Int32 endPosition)Public Function GetRange(startPosition As Int32, endPosition As Int32) As ITextRange// You can use this method in JavaScript.
- startPosition
- int Int32 Int32 Int32
The starting position of the new text range, relative to the beginning of the story.
- endPosition
- int Int32 Int32 Int32
The ending position of the new text range.
The new text range.
GetRangeFromPoint(Point, PointOptions) GetRangeFromPoint(Point, PointOptions) GetRangeFromPoint(Point, PointOptions) GetRangeFromPoint(Point, PointOptions)
Retrieves the degenerate (empty) text range at, or nearest to, a particular point on the screen.
public : ITextRange GetRangeFromPoint(Point point, PointOptions options)public ITextRange GetRangeFromPoint(Point point, PointOptions options)Public Function GetRangeFromPoint(point As Point, options As PointOptions) As ITextRange// You can use this method in JavaScript.
The alignment type of the specified point.
The new text range.
GetText(TextGetOptions, String) GetText(TextGetOptions, String) GetText(TextGetOptions, String) GetText(TextGetOptions, String)
Gets the text in the active story (document).
public : void GetText(TextGetOptions options, PlatForm::String value)public void GetText(TextGetOptions options, String value)Public Function GetText(options As TextGetOptions, value As String) As void// You can use this method in JavaScript.
The text retrieval options.
- value
- PlatForm::String String String String
The text in the active story.
LoadFromStream(TextSetOptions, IRandomAccessStream) LoadFromStream(TextSetOptions, IRandomAccessStream) LoadFromStream(TextSetOptions, IRandomAccessStream) LoadFromStream(TextSetOptions, IRandomAccessStream)
Loads a document from a stream.
public : void LoadFromStream(TextSetOptions options, IRandomAccessStream value)public void LoadFromStream(TextSetOptions options, IRandomAccessStream value)Public Function LoadFromStream(options As TextSetOptions, value As IRandomAccessStream) As void// You can use this method in JavaScript.
The text options to use for the loading the document.
The random access stream that contains the document.
Redo() Redo() Redo() Redo()
Reverses the most recent undo operation.
public : void Redo()public void Redo()Public Function Redo() As void// You can use this method in JavaScript.
SaveToStream(TextGetOptions, IRandomAccessStream) SaveToStream(TextGetOptions, IRandomAccessStream) SaveToStream(TextGetOptions, IRandomAccessStream) SaveToStream(TextGetOptions, IRandomAccessStream)
Saves the document to a stream.
public : void SaveToStream(TextGetOptions options, IRandomAccessStream value)public void SaveToStream(TextGetOptions options, IRandomAccessStream value)Public Function SaveToStream(options As TextGetOptions, value As IRandomAccessStream) As void// You can use this method in JavaScript.
The text options for saving the document.
The random access stream for saving the document.
SetDefaultCharacterFormat(ITextCharacterFormat) SetDefaultCharacterFormat(ITextCharacterFormat) SetDefaultCharacterFormat(ITextCharacterFormat) SetDefaultCharacterFormat(ITextCharacterFormat)
Sets the default character formatting attributes of the document.
public : void SetDefaultCharacterFormat(ITextCharacterFormat value)public void SetDefaultCharacterFormat(ITextCharacterFormat value)Public Function SetDefaultCharacterFormat(value As ITextCharacterFormat) As void// You can use this method in JavaScript.
The new default character formatting attributes.
SetDefaultParagraphFormat(ITextParagraphFormat) SetDefaultParagraphFormat(ITextParagraphFormat) SetDefaultParagraphFormat(ITextParagraphFormat) SetDefaultParagraphFormat(ITextParagraphFormat)
Sets the default paragraph formatting attributes of the document.
public : void SetDefaultParagraphFormat(ITextParagraphFormat value)public void SetDefaultParagraphFormat(ITextParagraphFormat value)Public Function SetDefaultParagraphFormat(value As ITextParagraphFormat) As void// You can use this method in JavaScript.
The default paragraph formatting attributes.
SetText(TextSetOptions, String) SetText(TextSetOptions, String) SetText(TextSetOptions, String) SetText(TextSetOptions, String)
Sets the text of the document.
public : void SetText(TextSetOptions options, PlatForm::String value)public void SetText(TextSetOptions options, String value)Public Function SetText(options As TextSetOptions, value As String) As void// You can use this method in JavaScript.
Options that control how the text is inserted into the document.
- value
- PlatForm::String String String String
The new text.
Remarks
If the string is NULL, the text in the document is deleted.