Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
auniverseaway authored Jan 25, 2025
2 parents 350401e + 9450f85 commit e461f50
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions blocks/edit/da-assets/da-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ export async function openAssets() {
const { state } = view;
dialog.close();

// eslint-disable-next-line no-underscore-dangle
const alt = asset?._embedded?.['http://ns.adobe.com/adobecloud/rel/metadata/asset']?.['dc:description'];

const imgObj = { src: `https://${pubRepoId}${path}`, style: 'width: 180px' };
if (alt) imgObj.alt = alt;

const fpo = state.schema.nodes.image.create(imgObj);
view.dispatch(state.tr.insert(state.selection.head, fpo).scrollIntoView());
},
Expand Down

0 comments on commit e461f50

Please sign in to comment.