From 50fa7e8b4b4009894d9d85a6ff835554860713b8 Mon Sep 17 00:00:00 2001 From: KaiSD Date: Thu, 5 Sep 2019 09:36:25 +0200 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'ace/index.html'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ace/index.html | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ace/index.html b/ace/index.html index 7080673..982da73 100644 --- a/ace/index.html +++ b/ace/index.html @@ -159,18 +159,11 @@ input.type = 'file'; input.onchange = e => { - - // getting a hold of the file reference var file = e.target.files[0]; - - // setting up the reader var reader = new FileReader(); reader.readAsText(file,'UTF-8'); - - // here we tell the reader what to do when it's done reading... reader.onload = readerEvent => { - var content = readerEvent.target.result; // this is the content! - editor.setValue(content); + editor.setValue(readerEvent.target.result); editor.clearSelection(); }