mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-23 12:05:36 +00:00
UBERF-4757 Expose isFocused function in collaborative editors (#4275)
Signed-off-by: Alexander Onnikov <alexander.onnikov@xored.com>
This commit is contained in:
parent
843ddfeb99
commit
564ad122e1
@ -36,6 +36,10 @@
|
||||
|
||||
export let focusIndex = -1
|
||||
|
||||
export function isFocused (): boolean {
|
||||
return editor?.isFocused() ?? false
|
||||
}
|
||||
|
||||
let editor: CollaborativeTextEditor
|
||||
|
||||
$: documentId = minioDocumentId(object._id, key)
|
||||
|
@ -37,6 +37,8 @@
|
||||
|
||||
const client = getClient()
|
||||
|
||||
let editor: CollaborativeAttributeBox
|
||||
|
||||
let refActions: RefAction[] = []
|
||||
let extraActions: RefAction[] = []
|
||||
let modelRefActions: RefAction[] = []
|
||||
@ -78,6 +80,10 @@
|
||||
|
||||
let inputFile: HTMLInputElement
|
||||
|
||||
export function isFocused (): boolean {
|
||||
return editor?.isFocused() ?? false
|
||||
}
|
||||
|
||||
export function handleAttach (): void {
|
||||
inputFile.click()
|
||||
}
|
||||
@ -218,6 +224,7 @@
|
||||
}}
|
||||
>
|
||||
<CollaborativeAttributeBox
|
||||
bind:this={editor}
|
||||
{object}
|
||||
{key}
|
||||
{focusIndex}
|
||||
|
Loading…
Reference in New Issue
Block a user