diff options
| author | bobzel <zzzman@gmail.com> | 2024-10-10 19:04:57 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-10-10 19:04:57 -0400 |
| commit | 3a35e2687e3c7b0c864dd4f00b1002ff088b56d3 (patch) | |
| tree | 98697432c5be99a0e1b64cc42eff9e7a0ec58457 /src/client/documents | |
| parent | f75f15ae58b57644c28d42446c176289bbe55dd4 (diff) | |
| parent | d347fc59feefd91a796012892da57511787bb6d0 (diff) | |
merged with master
Diffstat (limited to 'src/client/documents')
| -rw-r--r-- | src/client/documents/DocumentTypes.ts | 1 | ||||
| -rw-r--r-- | src/client/documents/Documents.ts | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/client/documents/DocumentTypes.ts b/src/client/documents/DocumentTypes.ts index 59a121de7..e79207b04 100644 --- a/src/client/documents/DocumentTypes.ts +++ b/src/client/documents/DocumentTypes.ts @@ -32,6 +32,7 @@ export enum DocumentType { ANNOPALETTE = 'annopalette', LOADING = 'loading', SIMULATION = 'simulation', // physics simulation + MESSAGE = 'message', // chat message // special purpose wrappers that either take no data or are compositions of lower level types LINK = 'link', diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index d529de8e5..059f88e96 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -809,6 +809,11 @@ export namespace Docs { export function RTFDocument(field: RichTextField, options: DocumentOptions = {}, fieldKey: string = 'text') { return InstanceFromProto(Prototypes.get(DocumentType.RTF), field, options, undefined, fieldKey); } + + export function MessageDocument(field: string, options: DocumentOptions = {}, fieldKey: string = 'data') { + return InstanceFromProto(Prototypes.get(DocumentType.MESSAGE), field, options, undefined, fieldKey); + } + export function TextDocument(text: string, options: DocumentOptions = {}, fieldKey: string = 'text') { const rtf = { doc: { |
