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:
parent
ddbd406fc8
commit
1b3a320b17
4 changed files with 133 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue