1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-03 23:50:33 +02:00

Desktop, Mobile: Add support for media player for video and audio files

Co-authored-by: Bryan <bryan.r.gerlach@gmail.com>
This commit is contained in:
Laurent Cozic
2020-08-02 12:03:49 +01:00
parent 7f73931530
commit 13280ce1b3
10 changed files with 54 additions and 10 deletions

View File

@ -3,7 +3,7 @@ const htmlUtils = require('../../htmlUtils.js');
const utils = require('../../utils');
function renderImageHtml(before, src, after, ruleOptions) {
const r = utils.imageReplacement(ruleOptions.ResourceModel, src, ruleOptions.resources, ruleOptions.resourceBaseUrl);
const r = utils.resourceReplacement(ruleOptions.ResourceModel, src, ruleOptions.resources, ruleOptions.resourceBaseUrl);
if (typeof r === 'string') return r;
if (r) return `<img ${before} ${htmlUtils.attributesHtml(r)} ${after}/>`;
return `[Image: ${src}]`;