Remove filename as default image caption (#316)

This commit is contained in:
Tom Moor 2017-10-17 20:39:28 -07:00 committed by GitHub
parent 3613e01094
commit 0515a6233e
1 changed files with 2 additions and 3 deletions

View File

@ -15,7 +15,6 @@ export default async function insertImageFile(
try {
// load the file as a data URL
const id = uuid.v4();
const alt = file.name;
const reader = new FileReader();
reader.addEventListener('load', () => {
const src = reader.result;
@ -25,7 +24,7 @@ export default async function insertImageFile(
.insertBlock({
type: 'image',
isVoid: true,
data: { src, alt, id, loading: true },
data: { src, id, loading: true },
})
.apply();
editor.onChange(state);
@ -46,7 +45,7 @@ export default async function insertImageFile(
);
return finalTransform.setNodeByKey(placeholder.key, {
data: { src, alt, loading: false },
data: { src, loading: false },
});
} catch (err) {
throw err;