This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
document$.subscribe(({ document }) => {
|
||||
const elements = document.querySelectorAll("[data-image-tooltip]")
|
||||
|
||||
elements.forEach(el => {
|
||||
const img = el.getAttribute("data-image-tooltip")
|
||||
|
||||
if (el._tooltipInitialized) return
|
||||
el._tooltipInitialized = true
|
||||
|
||||
window.document$.app?.tooltip?.create(el, {
|
||||
html: `<img src="${img}" style="max-width:200px;">`,
|
||||
interactive: true
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user