feat: New table screen for ui

- Add table screen to ui examples
- Display table with placeholder content
- Add global function replaceLineBreaks()
This commit is contained in:
sthag 2026-02-13 11:39:52 +01:00
parent ddbd406fc8
commit 1b3a320b17
4 changed files with 133 additions and 0 deletions

View file

@ -423,6 +423,20 @@ function randomIntFrom(min, max, pos = 0) {
return Math.floor((Math.random() * (max - min + 1) + min) / pos) * pos;
}
/**
* Ersetzt \n durch <br>.
*
* @param {string} text
* @returns {string}
*/
function replaceLineBreaks(text) {
if (text === '' || !text.includes('\n')) {
return text;
}
return text.split('\n').join('<br>');
}
// CONCEPTS
// NOTE: Benutzt private Zuweisungen