mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
🐛 Koenig - Fixed missing alt/title attributes when pasting markdown or HTML
refs https://github.com/TryGhost/Ghost/issues/9724 - capture the `alt` and `title` attributes in our figure and image parser plugins
This commit is contained in:
parent
cb7a038b08
commit
61ad09cbc4
1 changed files with 10 additions and 2 deletions
|
@ -33,7 +33,11 @@ export function figureToImageCard(node, builder, {addSection, nodeFinished}) {
|
|||
return;
|
||||
}
|
||||
|
||||
let payload = {src: img.src};
|
||||
let payload = {
|
||||
src: img.src,
|
||||
alt: img.alt,
|
||||
title: img.title
|
||||
};
|
||||
|
||||
if (figcaption) {
|
||||
// TODO: Allow rich text in captions
|
||||
|
@ -50,7 +54,11 @@ export function imgToCard(node, builder, {addSection, nodeFinished}) {
|
|||
return;
|
||||
}
|
||||
|
||||
let payload = {src: node.src};
|
||||
let payload = {
|
||||
src: node.src,
|
||||
alt: node.alt,
|
||||
title: node.title
|
||||
};
|
||||
|
||||
let cardSection = builder.createCardSection('image', payload);
|
||||
addSection(cardSection);
|
||||
|
|
Loading…
Add table
Reference in a new issue