Packages > @fluidframework/sequence > SharedString

SharedString Class

The Shared String is a specialized data structure for handling collaborative text. It is based on a more general Sequence data structure but has additional features that make working with text easier.

In addition to text, a Shared String can also contain markers. Markers can be used to store metadata at positions within the text, like the details of an image or Fluid object that should be rendered with the text.

WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.

Signature

export declare class SharedString extends SharedSegmentSequence<SharedStringSegment> implements ISharedString

Extends: SharedSegmentSequence <SharedStringSegment >

Implements: ISharedString

Constructors

Constructor Alerts Description
(constructor)(document, id, attributes) ALPHA Constructs a new instance of the SharedString class

Properties

Property Alerts Modifiers Type Description
id ALPHA string
ISharedString ALPHA readonly ISharedString

Constructor Details

(constructor) (ALPHA)

Constructs a new instance of the SharedString class

WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.

Signature

constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes);

Parameters

Parameter Type Description
document IFluidDataStoreRuntime
id string
attributes IChannelAttributes

Property Details

id (ALPHA)

WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.

Signature

id: string;

ISharedString (ALPHA)

WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.

Signature

get ISharedString(): ISharedString;