mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 11:42:30 +03:00
uberf-7755: fix image toolbar visibility (#6208)
Signed-off-by: Alexey Zinoviev <alexey.zinoviev@xored.com>
This commit is contained in:
parent
868556471d
commit
0bb4bb04ac
@ -416,6 +416,7 @@
|
||||
toolbar: {
|
||||
element: imageToolbarElement,
|
||||
boundary,
|
||||
appendTo: () => boundary ?? element,
|
||||
isHidden: () => !showToolbar
|
||||
}
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ export interface EditorKitOptions extends DefaultKitOptions {
|
||||
toolbar?: {
|
||||
element: HTMLElement
|
||||
boundary?: HTMLElement
|
||||
appendTo?: HTMLElement | (() => HTMLElement)
|
||||
isHidden?: () => boolean
|
||||
}
|
||||
})
|
||||
@ -232,7 +233,10 @@ async function buildEditorKit (): Promise<Extension<EditorKitOptions, any>> {
|
||||
if (this.options.image?.toolbar !== undefined) {
|
||||
imageOptions.toolbar = {
|
||||
...this.options.image?.toolbar,
|
||||
tippyOptions: getTippyOptions(this.options.image?.toolbar?.boundary)
|
||||
tippyOptions: getTippyOptions(
|
||||
this.options.image?.toolbar?.boundary,
|
||||
this.options.image?.toolbar?.appendTo
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user