Skip to main content

TextRetainOp Interface

A retain op in a character-level delta — a span of unchanged characters that the consumer should skip over.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Sealed

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

PropertyAlertsModifiersTypeDescription
countAlphareadonlynumberThe number of Unicode code points to retain.
formattingChangedAlphaoptional, readonlybooleanWhether at least one character in the retained range had a deep change.
typeAlphareadonly"retain"Discriminator identifying this op as a retain.

Property Details

count

The number of Unicode code points to retain.

This API is provided as an alpha preview and may change without notice.

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.

This API is provided as an alpha preview and may change without notice.

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.

This API is provided as an alpha preview and may change without notice.

For more information about our API support guarantees, see here.

Signature

readonly type: "retain";

Type: "retain"