auto change font size to small if text is too long
parent
c585dd8d63
commit
bbd5e5d33f
|
@ -1019,10 +1019,10 @@
|
|||
// show info text that the text is too long and we set the font size to small
|
||||
document.querySelector('#shx-info-text').style.display = 'block';
|
||||
|
||||
// hide the text after 5 seconds
|
||||
// hide the text after 8 seconds
|
||||
this.infoTextTimeout = setTimeout(() => {
|
||||
document.querySelector('#shx-info-text').style.display = 'none';
|
||||
}, 5000);
|
||||
}, 8000);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1148,6 +1148,7 @@
|
|||
this.infoText = document.createElement('span');
|
||||
this.infoText.id = 'shx-info-text';
|
||||
this.infoText.style.display = 'none';
|
||||
this.infoText.style.color = 'red';
|
||||
this.infoText.innerText = 'Text ist zu lang. Wir haben die Schriftgröße auf klein gesetzt. Bitte überprüfe deinen Text.';
|
||||
this.container.appendChild(this.infoText);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue