diff options
author | Alex Vitkov <alexvitkov98@gmail.com> | 2021-02-15 11:06:52 +0200 |
---|---|---|
committer | Alex Vitkov <alexvitkov98@gmail.com> | 2021-02-15 11:06:52 +0200 |
commit | e2ab5591cc6d30b1fa26e094b2c50aa7879cdd88 (patch) | |
tree | f61414f03c85753790b39603c5906fe1209be328 /loggedin.js | |
parent | 31533d6c9c94e23148c5d39ebcac3a59dc5acf62 (diff) | |
download | fileup-e2ab5591cc6d30b1fa26e094b2c50aa7879cdd88.tar.gz |
Editable text 0.1
Diffstat (limited to 'loggedin.js')
-rw-r--r-- | loggedin.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/loggedin.js b/loggedin.js index 33721e7..9efbb75 100644 --- a/loggedin.js +++ b/loggedin.js @@ -318,8 +318,6 @@ function openfile_nondir() { xhr.responseType = 'arraybuffer'; xhr.onload = function () { let b = `data:image/png;base64,${base64ArrayBuffer(xhr.response)}`; - - focus.filecontents.style.backgroundImage = `url('${b}')`; focus.filecontents.classList.add('imgview'); focus.filecontents.innerText = "asdf"; @@ -329,8 +327,11 @@ function openfile_nondir() { focus.filecontents.classList.remove('imgview'); focus.filecontents.style.backgroundImage = "unset"; + var pre = mk(focus.filecontents, 'pre'); + xhr.onload = function () { - focus.filecontents.innerText = xhr.responseText; + pre.innerText = xhr.responseText; + pre.contentEditable = "true"; }; } |