update: export markdown to relative path
This commit is contained in:
parent
d37d665317
commit
3048b1b933
|
|
@ -1707,11 +1707,11 @@ let bundle;
|
|||
`${_Zotero.Knowledge4Zotero.knowledge._exportPath}\\${imgKey}.${ext}`
|
||||
);
|
||||
Zotero.debug(newFile.path);
|
||||
const newFilePath = `attachments\\${newFile.path
|
||||
.split("\\")
|
||||
.pop()}`;
|
||||
|
||||
img.setAttribute(
|
||||
"src",
|
||||
_Zotero.isMac ? "file://" + newFile.path : newFile.path
|
||||
);
|
||||
img.setAttribute("src", newFilePath);
|
||||
img.setAttribute("alt", "image");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ configs[TRANSLATOR_ID_BETTER_MARKDOWN] = {
|
|||
},
|
||||
inRepository: true,
|
||||
translatorType: 2,
|
||||
lastUpdated: "2022-06-01 10:26:46",
|
||||
lastUpdated: "2022-06-01 23:26:46",
|
||||
_codePath:
|
||||
"chrome://Knowledge4Zotero/content/translators/Better Note Markdown.js",
|
||||
};
|
||||
|
|
|
|||
|
|
@ -660,13 +660,7 @@ class Knowledge extends AddonBase {
|
|||
}
|
||||
|
||||
if (saveFile) {
|
||||
if (
|
||||
(await new Zotero.Translate.Export().getTranslators()).filter(
|
||||
(e) => e.translatorID === TRANSLATOR_ID_BETTER_MARKDOWN
|
||||
)
|
||||
) {
|
||||
await loadTranslator(TRANSLATOR_ID_BETTER_MARKDOWN);
|
||||
}
|
||||
await loadTranslator(TRANSLATOR_ID_BETTER_MARKDOWN);
|
||||
|
||||
const filename = await pick(
|
||||
Zotero.getString("fileInterface.export"),
|
||||
|
|
|
|||
Loading…
Reference in New Issue