add info message for space between emoji and text

main
alexanderroese 2024-08-14 00:37:24 +02:00
parent 4f1716d069
commit d1c4da5516
1 changed files with 7 additions and 1 deletions

View File

@ -561,6 +561,8 @@
return !regex.test(text);
}
let shxInfoTextTimeout = null;
function SHX_IFC_genTextInput(inputID, labelText, inputName, inputVal, section_id, maxLength = 24, emojisSupported = false) {
function handleInputLabel(value) {
let inputLabel = document.querySelector(`label[for="${inputID}-label"] span`)
@ -600,8 +602,12 @@
document.querySelector('#shx-info-text').style.color = '#45aaf2';
document.querySelector('#shx-info-text').innerHTML = '<strong>Tipp:</strong> Füge <strong>Leerzeichen</strong> zwischen <strong>Text</strong> und <strong>Emojis</strong> ein, um den Text besser lesbar zu machen.';
if (shxInfoTextTimeout) {
clearTimeout(shxInfoTextTimeout);
}
// hide the text after 8 seconds
setTimeout(() => {
shxInfoTextTimeout = setTimeout(() => {
document.querySelector('#shx-info-text').style.display = 'none';
}, 8000);
}