mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-22 16:27:22 +00: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 field: string | undefined = undefined
|
||||||
|
|
||||||
export let autoOverflow = false
|
export let autoOverflow = false
|
||||||
|
export let initialContent: string | undefined = undefined
|
||||||
|
|
||||||
const ydoc = (getContext(CollaborationIds.Doc) as Y.Doc | undefined) ?? new Y.Doc()
|
const ydoc = (getContext(CollaborationIds.Doc) as Y.Doc | undefined) ?? new Y.Doc()
|
||||||
const contextProvider = getContext(CollaborationIds.Provider) as WebsocketProvider | undefined
|
const contextProvider = getContext(CollaborationIds.Provider) as WebsocketProvider | undefined
|
||||||
@ -265,6 +266,10 @@
|
|||||||
updateFormattingState()
|
updateFormattingState()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (initialContent) {
|
||||||
|
insertText(initialContent)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user