mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
TSK-1146: Support initial content text for collaborator doc (#2960)
Signed-off-by: Anton Brechka <anton.brechka@ezthera.com>
This commit is contained in:
parent
ad9ffff2e5
commit
12404949d0
@ -80,6 +80,7 @@
|
||||
export let field: string | undefined = undefined
|
||||
|
||||
export let autoOverflow = false
|
||||
export let initialContent: string | undefined = undefined
|
||||
|
||||
const ydoc = (getContext(CollaborationIds.Doc) as Y.Doc | undefined) ?? new Y.Doc()
|
||||
const contextProvider = getContext(CollaborationIds.Provider) as WebsocketProvider | undefined
|
||||
@ -265,6 +266,10 @@
|
||||
updateFormattingState()
|
||||
}
|
||||
})
|
||||
|
||||
if (initialContent) {
|
||||
insertText(initialContent)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user