DebugConsole output: add text selection & copying

This commit is contained in:
miruka
2020-09-28 18:10:26 -04:00
parent 4cc4229728
commit 192112ab4e
2 changed files with 96 additions and 23 deletions

View File

@@ -196,6 +196,13 @@ QtObject {
}
function plain2Html(text) {
// Escape html, convert `\n` into `<br>` tags and `\t` into four spaces
return escapeHtml(text).replace(/\n/g, "<br>")
.replace(/\t/g, "&nbsp;" * 4)
}
function htmlColorize(text, color) {
return `<font color="${color}">${text}</font>`
}