TextRetainOp Interface
A retain op in a character-level delta — a span of unchanged characters that the consumer should skip over.
For more information about our API support guarantees, see here.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
/** @sealed */
interface TextRetainOp
Properties
| Property | Alerts | Modifiers | Type | Description |
|---|---|---|---|---|
| count | Alpha | readonly | number | The number of Unicode code points to retain. |
| formattingChanged | Alpha | optional, readonly | boolean | Whether at least one character in the retained range had a deep change. |
| type | Alpha | readonly | "retain" | Discriminator identifying this op as a retain. |
Property Details
count
The number of Unicode code points to retain.
For more information about our API support guarantees, see here.
Signature
readonly count: number;
Type: number
formattingChanged
Whether at least one character in the retained range had a deep change.
For more information about our API support guarantees, see here.
Signature
readonly formattingChanged?: boolean;
Type: boolean
Remarks
Present only on retain ops delivered by @fluidframework/tree#FormattedTextAsTree.Members.onContentChanged; always absent on retain ops delivered by onCharactersChanged(callback). When present, true indicates the retained range contained a formatting property update or an atom content edit; false indicates no deep change.
type
Discriminator identifying this op as a retain.
For more information about our API support guarantees, see here.
Signature
readonly type: "retain";
Type: "retain"