Fix html export not including images (#9260)
* Fix html export not including images * Respect showPlaceholder * Add tests
This commit is contained in:
parent
638175b7d7
commit
52fc8ff255
3 changed files with 68 additions and 23 deletions
|
@ -316,7 +316,7 @@ export default class HTMLExporter extends Exporter {
|
|||
}
|
||||
|
||||
if (filePath) {
|
||||
const mxc = mxEv.getContent().url || mxEv.getContent().file?.url;
|
||||
const mxc = mxEv.getContent().url ?? mxEv.getContent().file?.url;
|
||||
eventTileMarkup = eventTileMarkup.split(mxc).join(filePath);
|
||||
}
|
||||
eventTileMarkup = eventTileMarkup.replace(/<span class="mx_MFileBody_info_icon".*?>.*?<\/span>/, '');
|
||||
|
@ -382,7 +382,9 @@ export default class HTMLExporter extends Exporter {
|
|||
joined,
|
||||
);
|
||||
}
|
||||
} else eventTile = await this.getEventTileMarkup(mxEv, joined);
|
||||
} else {
|
||||
eventTile = await this.getEventTileMarkup(mxEv, joined);
|
||||
}
|
||||
} catch (e) {
|
||||
// TODO: Handle callEvent errors
|
||||
logger.error(e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue