mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-22 08:20:39 +00: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: {
|
toolbar: {
|
||||||
element: imageToolbarElement,
|
element: imageToolbarElement,
|
||||||
boundary,
|
boundary,
|
||||||
|
appendTo: () => boundary ?? element,
|
||||||
isHidden: () => !showToolbar
|
isHidden: () => !showToolbar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,7 @@ export interface EditorKitOptions extends DefaultKitOptions {
|
|||||||
toolbar?: {
|
toolbar?: {
|
||||||
element: HTMLElement
|
element: HTMLElement
|
||||||
boundary?: HTMLElement
|
boundary?: HTMLElement
|
||||||
|
appendTo?: HTMLElement | (() => HTMLElement)
|
||||||
isHidden?: () => boolean
|
isHidden?: () => boolean
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -232,7 +233,10 @@ async function buildEditorKit (): Promise<Extension<EditorKitOptions, any>> {
|
|||||||
if (this.options.image?.toolbar !== undefined) {
|
if (this.options.image?.toolbar !== undefined) {
|
||||||
imageOptions.toolbar = {
|
imageOptions.toolbar = {
|
||||||
...this.options.image?.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