Skip to content

Commit

Permalink
Pre-fill title field when loading file content
Browse files Browse the repository at this point in the history
  • Loading branch information
matze committed Jan 14, 2025
1 parent 6ad3e7a commit fff1304
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/javascript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ function openFile() {
input.type = "file";
input.onchange = ev => {
const item = ev.target.files[0];
let titleInput = document.getElementById('title');

titleInput.value = item.name;
item.text().then((value) => textarea.value = value);
};

Expand Down

0 comments on commit fff1304

Please sign in to comment.