Last active
December 14, 2017 13:27
-
-
Save bjoerntx/9c4df39fe5234a041f219d8e131171ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById('file').addEventListener('change', readFile, false); | |
function readFile(evt) { | |
var files = evt.target.files; | |
var file = files[0]; | |
var reader = new FileReader(); | |
reader.onload = function (event) { | |
var binaryString = btoa(event.target.result); | |
TXTextControl.images.addInline(binaryString, -1); | |
} | |
reader.readAsBinaryString(file); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment