修复类文本类型HTML文件预览的bug

This commit is contained in:
kl 2020-12-29 18:37:50 +08:00
parent 5ec53c4b33
commit 4747ee93b2
1 changed files with 4 additions and 4 deletions

View File

@ -39,10 +39,10 @@
*加载普通文本
*/
function loadText() {
var textData = Base64.decode($("#textData").val())
var textPreData = "<pre style='background-color: #FFFFFF;border:none'>" + textData + "</pre>";
$("#text").html(textPreData);
var base64data = $("#textData").val()
var textData = Base64.decode(base64data);
var textPreData = "<xmp style='background-color: #FFFFFF;overflow-y: scroll;border:none'>" + textData + "</xmp>";
$("#text").append(textPreData);
}
</script>