When using the RichText editor inside a DHX Window, the toolbar tooltips are displayed behind the window (see screenshot).
Code Example:
const win = new dhx.Window({
title: 'test'
});
const form = new dhx.Form(null, {
css: "dhx_widget--bg_white dhx_widget--bordered",
padding: 40,
rows: [
{
type: "input",
label: "Email",
name: "email",
placeholder: "jd@mail.name"
},
{
type: "container",
name: "richtextContainer",
height: 400
}
]
});
let richtextInstance = null;
function initRichtextWhenReady() {
const selector = '[data-cell-id="richtextContainer"] .dhx_layout-cell';
let attempts = 0;
const maxAttempts = 100;
function tryInit() {
const containerEl = document.querySelector(selector);
if (containerEl) {
richtextInstance = new richtext.Richtext(containerEl, {
value: "<p>Hello Richtext</p>"
});
return;
}
if (attempts < maxAttempts) {
attempts++;
setTimeout(tryInit, 10);
}
}
tryInit();
}
win.attach(form)
win.show()
initRichtextWhenReady();
