Read input file
continuous-integration/drone/push Build is passing Details

error-extensions-editor
Clément FRÉVILLE 1 year ago
parent 6f8d1a3cc8
commit 2cf473d085

@ -71,6 +71,12 @@ export class EditorComponent {
for (const language of this.languages) {
if (language.extensions.some(ext => file.name.endsWith(`.${ext}`))) {
this.selectedLanguage = language;
const reader = new FileReader();
reader.onload = (event) => {
this.editorContent = event.target!.result as string;
this.errorMessage = '';
};
reader.readAsText(file);
return;
}
}

Loading…
Cancel
Save