You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Desktop: Fixed attachment markup when importing ENEX files as HTML so that it works in mobile too
This commit is contained in:
@ -45,12 +45,9 @@ const attributesToStr = (attributes) =>
|
|||||||
.map(([key, value]) => ` ${key}="${escapeQuotes(value)}"`)
|
.map(([key, value]) => ` ${key}="${escapeQuotes(value)}"`)
|
||||||
.join('');
|
.join('');
|
||||||
|
|
||||||
const ipcProxySendToHost = (id) =>
|
|
||||||
`onclick="ipcProxySendToHost('joplin://${id}'); return false;"`;
|
|
||||||
|
|
||||||
const attachmentElement = ({src, attributes, id}) =>
|
const attachmentElement = ({src, attributes, id}) =>
|
||||||
[
|
[
|
||||||
`<a href='#' ${attributesToStr(attributes)} ${ipcProxySendToHost(id)}>`,
|
`<a href='joplin://${id}' ${attributesToStr(attributes)}>`,
|
||||||
` ${attributes.alt || src}`,
|
` ${attributes.alt || src}`,
|
||||||
'</a>',
|
'</a>',
|
||||||
].join('');
|
].join('');
|
||||||
@ -67,7 +64,7 @@ const audioElement = ({src, alt, id}) =>
|
|||||||
' </p>',
|
' </p>',
|
||||||
'</audio>',
|
'</audio>',
|
||||||
'<p>',
|
'<p>',
|
||||||
` <a href="${src}" ${ipcProxySendToHost(id)}>`,
|
` <a href="${src}">`,
|
||||||
` ${alt || src || id || 'Download audio'}`,
|
` ${alt || src || id || 'Download audio'}`,
|
||||||
' </a>',
|
' </a>',
|
||||||
'</p>',
|
'</p>',
|
||||||
|
Reference in New Issue
Block a user